[cfe-commits] r50082 - /cfe/trunk/utils/ccc-analyzer
Nate Begeman
natebegeman at mac.com
Mon Apr 21 21:47:33 PDT 2008
Author: sampo
Date: Mon Apr 21 23:47:32 2008
New Revision: 50082
URL: http://llvm.org/viewvc/llvm-project?rev=50082&view=rev
Log:
Don't double-increment counter for -arch and -isysroot
Modified:
cfe/trunk/utils/ccc-analyzer
Modified: cfe/trunk/utils/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc-analyzer?rev=50082&r1=50081&r2=50082&view=diff
==============================================================================
--- cfe/trunk/utils/ccc-analyzer (original)
+++ cfe/trunk/utils/ccc-analyzer Mon Apr 21 23:47:32 2008
@@ -174,24 +174,32 @@
if arg[:5] in ['-std=']:
compile_opts.append(arg)
- # Options with one argument that should pass through
- if arg in ['-include', '-isysroot', '-arch']:
+ # Options with one argument that should pass through to compiler
+ if arg == 'include':
compile_opts.append(arg)
compile_opts.append(args[i+1])
i += 1
- # Prefix matches for the link mode
- if arg[:2] in ['-l', '-L', '-O', '-F']:
- if arg == '-O': arg = '-O1'
- if arg == '-Os': arg = '-O2'
+ # Options with one argument that should pass through to linker
+ if arg == 'framework':
link_opts.append(arg)
+ link_opts.append(args[i+1])
+ i += 1
- # Options with one argument that should pass through
- if arg in ['-framework', '-isysroot', '-arch']:
+ # Options with one argument that should pass through to both
+ if arg in ['-isysroot', '-arch']:
+ compile_opts.append(arg)
+ compile_opts.append(args[i+1])
link_opts.append(arg)
link_opts.append(args[i+1])
i += 1
+ # Prefix matches for the link mode
+ if arg[:2] in ['-l', '-L', '-O', '-F']:
+ if arg == '-O': arg = '-O1'
+ if arg == '-Os': arg = '-O2'
+ link_opts.append(arg)
+
# Input files
if arg == '-filelist':
f = open(args[i+1])
More information about the cfe-commits
mailing list