Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: tools/gcmole/gcmole.lua

Issue 16878003: Make sure GCMole pukes when Clang invocation fails. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698