Make Clang plugins directory configurable for GCMole.

R=jkummerow@chromium.org

Review URL: https://codereview.chromium.org/13956027

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14374 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3cd9f6a4
......@@ -80,11 +80,16 @@ end
-- Clang invocation
local CLANG_BIN = os.getenv "CLANG_BIN"
local CLANG_PLUGINS = os.getenv "CLANG_PLUGINS"
if not CLANG_BIN or CLANG_BIN == "" then
error "CLANG_BIN not set"
end
if not CLANG_PLUGINS or CLANG_PLUGINS == "" then
CLANG_PLUGINS = DIR
end
local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define)
if plugin_args then
for i = 1, #plugin_args do
......@@ -92,7 +97,7 @@ local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define)
end
plugin_args = " " .. table.concat(plugin_args, " ")
end
return CLANG_BIN .. "/clang -cc1 -load " .. DIR .. "/libgcmole.so"
return CLANG_BIN .. "/clang -cc1 -load " .. CLANG_PLUGINS .. "/libgcmole.so"
.. " -plugin " .. plugin
.. (plugin_args or "")
.. " -triple " .. triple
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment