Chromium Code Reviews

Unified Diff: tools/gcmole/gcmole.lua

Issue 935843003: Make gcmole correctly handle 32 bit architectures. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gcmole/gcmole.lua
diff --git a/tools/gcmole/gcmole.lua b/tools/gcmole/gcmole.lua
index d287f7b9122bf3d32e7bf02c04f7ccd8761e4be5..aac2d2ff29f70567f2dafb6d84362b81d4e31a24 100644
--- a/tools/gcmole/gcmole.lua
+++ b/tools/gcmole/gcmole.lua
@@ -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, clang_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"
+ .. " " .. clang_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.clang_options)
Michael Starzinger 2015/02/18 09:41:54 nit: Maybe call this "arch_options" instead? WDYT?
Michael Achenbach 2015/02/18 11:15:29 Done.
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",
+ clang_options = "-m32" },
arm = config { triple = "i586-unknown-linux",
- arch_define = "V8_TARGET_ARCH_ARM" },
+ arch_define = "V8_TARGET_ARCH_ARM",
+ clang_options = "-m32" },
x64 = config { triple = "x86_64-unknown-linux",
- arch_define = "V8_TARGET_ARCH_X64" },
+ arch_define = "V8_TARGET_ARCH_X64",
+ clang_options = "" },
arm64 = config { triple = "x86_64-unknown-linux",
- arch_define = "V8_TARGET_ARCH_ARM64" },
+ arch_define = "V8_TARGET_ARCH_ARM64",
+ clang_options = "" },
}
-------------------------------------------------------------------------------
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine