Commit 7307bf0f authored by machenbach's avatar machenbach Committed by Commit bot

Make gcmole correctly handle 32 bit architectures.

NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#26723}
parent dccc2230
......@@ -90,7 +90,8 @@ if not CLANG_PLUGINS or CLANG_PLUGINS == "" then
CLANG_PLUGINS = DIR
end
local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define)
local function MakeClangCommandLine(
plugin, plugin_args, triple, arch_define, arch_options)
if plugin_args then
for i = 1, #plugin_args do
plugin_args[i] = "-Xclang -plugin-arg-" .. plugin
......@@ -109,13 +110,15 @@ local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define)
.. " -I./"
.. " -Ithird_party/icu/source/common"
.. " -Ithird_party/icu/source/i18n"
.. " " .. arch_options
end
function InvokeClangPluginForEachFile(filenames, cfg, func)
local cmd_line = MakeClangCommandLine(cfg.plugin,
cfg.plugin_args,
cfg.triple,
cfg.arch_define)
cfg.arch_define,
cfg.arch_options)
for _, filename in ipairs(filenames) do
log("-- %s", filename)
local action = cmd_line .. " " .. filename .. " 2>&1"
......@@ -201,13 +204,17 @@ end
local ARCHITECTURES = {
ia32 = config { triple = "i586-unknown-linux",
arch_define = "V8_TARGET_ARCH_IA32" },
arch_define = "V8_TARGET_ARCH_IA32",
arch_options = "-m32" },
arm = config { triple = "i586-unknown-linux",
arch_define = "V8_TARGET_ARCH_ARM" },
arch_define = "V8_TARGET_ARCH_ARM",
arch_options = "-m32" },
x64 = config { triple = "x86_64-unknown-linux",
arch_define = "V8_TARGET_ARCH_X64" },
arch_define = "V8_TARGET_ARCH_X64",
arch_options = "" },
arm64 = config { triple = "x86_64-unknown-linux",
arch_define = "V8_TARGET_ARCH_ARM64" },
arch_define = "V8_TARGET_ARCH_ARM64",
arch_options = "" },
}
-------------------------------------------------------------------------------
......
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