[cfe-commits] r46353 - /cfe/trunk/utils/ccc
Seo Sanghyeon
sanxiyn at gmail.com
Fri Jan 25 06:57:55 PST 2008
Author: sanxiyn
Date: Fri Jan 25 08:57:54 2008
New Revision: 46353
URL: http://llvm.org/viewvc/llvm-project?rev=46353&view=rev
Log:
Implement -print-prog-name. Patch by Nuno Lopes.
Modified:
cfe/trunk/utils/ccc
Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=46353&r1=46352&r2=46353&view=diff
==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Fri Jan 25 08:57:54 2008
@@ -39,7 +39,7 @@
def main(args):
action = 'link'
output = ''
- compile_opts = ['-U__GNUC__']
+ compile_opts = []
link_opts = []
files = []
@@ -50,6 +50,8 @@
action = 'preprocess'
if arg == '-c':
action = 'compile'
+ if arg.startswith('-print-prog-name'):
+ action = 'print-prog-name'
if arg == '-o':
output = args[i+1]
i += 1
@@ -68,6 +70,11 @@
files.append(arg)
i += 1
+ if action == 'print-prog-name':
+ # assume we can handle everything
+ print sys.argv[0]
+ return
+
if not files:
error('no input files')
More information about the cfe-commits
mailing list