| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 local cmd_line = MakeClangCommandLine(cfg.plugin, | 110 local cmd_line = MakeClangCommandLine(cfg.plugin, |
| 111 cfg.plugin_args, | 111 cfg.plugin_args, |
| 112 cfg.triple, | 112 cfg.triple, |
| 113 cfg.arch_define) | 113 cfg.arch_define) |
| 114 for _, filename in ipairs(filenames) do | 114 for _, filename in ipairs(filenames) do |
| 115 log("-- %s", filename) | 115 log("-- %s", filename) |
| 116 local action = cmd_line .. " src/" .. filename .. " 2>&1" | 116 local action = cmd_line .. " src/" .. filename .. " 2>&1" |
| 117 if FLAGS.verbose then print('popen ', action) end | 117 if FLAGS.verbose then print('popen ', action) end |
| 118 local pipe = io.popen(action) | 118 local pipe = io.popen(action) |
| 119 func(filename, pipe:lines()) | 119 func(filename, pipe:lines()) |
| 120 pipe:close() | 120 local success = pipe:close() |
| 121 if not success then error("Failed to run: " .. action) end |
| 121 end | 122 end |
| 122 end | 123 end |
| 123 | 124 |
| 124 ------------------------------------------------------------------------------- | 125 ------------------------------------------------------------------------------- |
| 125 -- GYP file parsing | 126 -- GYP file parsing |
| 126 | 127 |
| 127 local function ParseGYPFile() | 128 local function ParseGYPFile() |
| 128 local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file") | 129 local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file") |
| 129 local gyp = f:read('*a') | 130 local gyp = f:read('*a') |
| 130 f:close() | 131 f:close() |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 | 372 |
| 372 for _, arch in ipairs(ARCHS) do | 373 for _, arch in ipairs(ARCHS) do |
| 373 if not ARCHITECTURES[arch] then | 374 if not ARCHITECTURES[arch] then |
| 374 error ("Unknown arch: " .. arch) | 375 error ("Unknown arch: " .. arch) |
| 375 end | 376 end |
| 376 | 377 |
| 377 errors = SafeCheckCorrectnessForArch(arch, report) or errors | 378 errors = SafeCheckCorrectnessForArch(arch, report) or errors |
| 378 end | 379 end |
| 379 | 380 |
| 380 os.exit(errors and 1 or 0) | 381 os.exit(errors and 1 or 0) |
| OLD | NEW |