def main(args):
action = 'link'
output = ''
- compile_opts = ['-U__GNUC__']
+ compile_opts = []
link_opts = []
files = []
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
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')