Reviewers: Sven Panne, Michael Starzinger,

Message:
PTAL

Description:
Make gcmole correctly handle 32 bit architectures.

BUG=

Please review this at https://codereview.chromium.org/935843003/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+13, -6 lines):
  M tools/gcmole/gcmole.lua


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)
    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 = "" },
 }

-------------------------------------------------------------------------------


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to