Skip to content
Snippets Groups Projects
Commit 969b48cb authored by Daniel Dunbar's avatar Daniel Dunbar
Browse files

ccc: Add support for another batch of OS X linker options, including

-mmacosx-version-min.

One might anticipate that at some point I will just break down and go
through the man page. That seems a little too obvious.

llvm-svn: 56890
parent f4a36407
No related branches found
No related tags found
No related merge requests found
...@@ -195,6 +195,11 @@ def main(args): ...@@ -195,6 +195,11 @@ def main(args):
while i < len(args): while i < len(args):
arg = args[i] arg = args[i]
if '=' in arg:
argkey,argvalue = arg.split('=',1)
else:
argkey,argvalue = arg,None
# Modes ccc supports # Modes ccc supports
if arg == '-save-temps': if arg == '-save-temps':
save_temps = 1 save_temps = 1
...@@ -225,21 +230,23 @@ def main(args): ...@@ -225,21 +230,23 @@ def main(args):
compile_opts.append(arg) compile_opts.append(arg)
# Options with one argument that should pass through to compiler # Options with one argument that should pass through to compiler
if arg in [ '-include', '-idirafter', '-iprefix', if argkey in [ '-include', '-idirafter', '-iprefix',
'-iquote', '-isystem', '-iwithprefix', '-iquote', '-isystem', '-iwithprefix',
'-iwithprefixbefore']: '-iwithprefixbefore', '-mmacosx-version-min']:
compile_opts.append(arg) compile_opts.append(arg)
compile_opts.append(args[i+1]) compile_opts.append(args[i+1])
i += 1 i += 1
# Options with no arguments that should pass through # Options with no arguments that should pass through
if arg in ('-dynamiclib','-bundle'): if arg in ('-dynamiclib', '-bundle', '-headerpad_max_install_names'):
link_opts.append(arg) link_opts.append(arg)
# Options with one argument that should pass through # Options with one argument that should pass through
if arg in ('-framework', '-multiply_defined', '-bundle_loader', if arg in ('-framework', '-multiply_defined', '-bundle_loader',
'-e', '-unexported_symbols_list', '-install_name', '-e', '-install_name',
'-compatibility_version', '-current_version'): '-unexported_symbols_list', '-exported_symbols_list',
'-compatibility_version', '-current_version', '-init',
'-seg1addr', '-dylib_file'):
link_opts.append(arg) link_opts.append(arg)
link_opts.append(args[i+1]) link_opts.append(args[i+1])
i += 1 i += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment