OLD | NEW |
1 -- Copyright 2011 the V8 project authors. All rights reserved. | 1 -- Copyright 2011 the V8 project authors. All rights reserved. |
2 -- Redistribution and use in source and binary forms, with or without | 2 -- Redistribution and use in source and binary forms, with or without |
3 -- modification, are permitted provided that the following conditions are | 3 -- modification, are permitted provided that the following conditions are |
4 -- met: | 4 -- met: |
5 -- | 5 -- |
6 -- * Redistributions of source code must retain the above copyright | 6 -- * Redistributions of source code must retain the above copyright |
7 -- notice, this list of conditions and the following disclaimer. | 7 -- notice, this list of conditions and the following disclaimer. |
8 -- * Redistributions in binary form must reproduce the above | 8 -- * Redistributions in binary form must reproduce the above |
9 -- copyright notice, this list of conditions and the following | 9 -- copyright notice, this list of conditions and the following |
10 -- disclaimer in the documentation and/or other materials provided | 10 -- disclaimer in the documentation and/or other materials provided |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 error "CLANG_BIN not set" | 86 error "CLANG_BIN not set" |
87 end | 87 end |
88 | 88 |
89 if not CLANG_PLUGINS or CLANG_PLUGINS == "" then | 89 if not CLANG_PLUGINS or CLANG_PLUGINS == "" then |
90 CLANG_PLUGINS = DIR | 90 CLANG_PLUGINS = DIR |
91 end | 91 end |
92 | 92 |
93 local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define) | 93 local function MakeClangCommandLine(plugin, plugin_args, triple, arch_define) |
94 if plugin_args then | 94 if plugin_args then |
95 for i = 1, #plugin_args do | 95 for i = 1, #plugin_args do |
96 plugin_args[i] = "-plugin-arg-" .. plugin .. " " .. plugin_args[i] | 96 plugin_args[i] = "-Xclang -plugin-arg-" .. plugin |
| 97 .. " -Xclang " .. plugin_args[i] |
97 end | 98 end |
98 plugin_args = " " .. table.concat(plugin_args, " ") | 99 plugin_args = " " .. table.concat(plugin_args, " ") |
99 end | 100 end |
100 return CLANG_BIN .. "/clang -cc1 -load " .. CLANG_PLUGINS .. "/libgcmole.so" | 101 return CLANG_BIN .. "/clang++ -c " |
101 .. " -plugin " .. plugin | 102 .. " -Xclang -load -Xclang " .. CLANG_PLUGINS .. "/libgcmole.so" |
| 103 .. " -Xclang -plugin -Xclang " .. plugin |
102 .. (plugin_args or "") | 104 .. (plugin_args or "") |
103 .. " -triple " .. triple | 105 .. " -Xclang -triple -Xclang " .. triple |
104 .. " -D" .. arch_define | 106 .. " -D" .. arch_define |
105 .. " -DENABLE_DEBUGGER_SUPPORT" | 107 .. " -DENABLE_DEBUGGER_SUPPORT" |
106 .. " -DV8_I18N_SUPPORT" | 108 .. " -DV8_I18N_SUPPORT" |
107 .. " -I./" | 109 .. " -I./" |
108 .. " -Ithird_party/icu/source/common" | 110 .. " -Ithird_party/icu/source/common" |
109 .. " -Ithird_party/icu/source/i18n" | 111 .. " -Ithird_party/icu/source/i18n" |
110 end | 112 end |
111 | 113 |
112 function InvokeClangPluginForEachFile(filenames, cfg, func) | 114 function InvokeClangPluginForEachFile(filenames, cfg, func) |
113 local cmd_line = MakeClangCommandLine(cfg.plugin, | 115 local cmd_line = MakeClangCommandLine(cfg.plugin, |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 | 386 |
385 for _, arch in ipairs(ARCHS) do | 387 for _, arch in ipairs(ARCHS) do |
386 if not ARCHITECTURES[arch] then | 388 if not ARCHITECTURES[arch] then |
387 error ("Unknown arch: " .. arch) | 389 error ("Unknown arch: " .. arch) |
388 end | 390 end |
389 | 391 |
390 errors = SafeCheckCorrectnessForArch(arch, report) or errors | 392 errors = SafeCheckCorrectnessForArch(arch, report) or errors |
391 end | 393 end |
392 | 394 |
393 os.exit(errors and 1 or 0) | 395 os.exit(errors and 1 or 0) |
OLD | NEW |