[prev in list] [next in list] [prev in thread] [next in thread]
List: cfe-commits
Subject: [cfe-commits] r56884 - /cfe/trunk/utils/ccc
From: Daniel Dunbar <daniel () zuster ! org>
Date: 2008-09-30 21:20:51
Message-ID: 200809302120.m8ULKp3b006354 () zion ! cs ! uiuc ! edu
[Download RAW message or body]
Author: ddunbar
Date: Tue Sep 30 16:20:51 2008
New Revision: 56884
URL: http://llvm.org/viewvc/llvm-project?rev=56884&view=rev
Log:
ccc: Infer action type upfront.
- More straightforward, e.g. -E should always imply action =
'preprocess' (I think).
- Pass another option through for OS X.
Modified:
cfe/trunk/utils/ccc
Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=56884&r1=56883&r2=56884&view=diff
==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Tue Sep 30 16:20:51 2008
@@ -171,8 +171,18 @@
else:
return ""
+def inferaction(args):
+ if '-E' in args:
+ return 'preprocess'
+ if '-c' in args:
+ return 'compile'
+ for arg in args:
+ if arg.startswith('-print-prog-name'):
+ return 'pring-prog-name'
+ return 'link'
+
def main(args):
- action = 'link'
+ action = inferaction(args)
output = ''
compile_opts = []
link_opts = []
@@ -186,12 +196,6 @@
arg = args[i]
# Modes ccc supports
- if arg == '-E':
- action = 'preprocess'
- if arg == '-c':
- action = 'compile'
- if arg.startswith('-print-prog-name'):
- action = 'print-prog-name'
if arg == '-save-temps':
save_temps = 1
if arg == '-emit-llvm' or arg == '--emit-llvm':
@@ -229,7 +233,7 @@
i += 1
# Options with no arguments that should pass through
- if arg in ('-dynamiclib',):
+ if arg in ('-dynamiclib','-bundle'):
link_opts.append(arg)
# Options with one argument that should pass through
@@ -280,7 +284,7 @@
i += 1
i += 1
-
+
if action == 'print-prog-name':
# assume we can handle everything
print sys.argv[0]
_______________________________________________
cfe-commits mailing list
cfe-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic