Index: pylib/gyp/generator/ninja.py |
=================================================================== |
--- pylib/gyp/generator/ninja.py (revision 1715) |
+++ pylib/gyp/generator/ninja.py (working copy) |
@@ -1643,6 +1643,7 @@ |
cc = 'gcc' |
cxx = 'g++' |
ld = '$cxx' |
+ ld_c = '$cc' |
ld_host = '$cxx_host' |
cc_host = None |
@@ -1895,7 +1896,7 @@ |
# Record the public interface of $lib in $lib.TOC. See the corresponding |
# comment in the posix section above for details. |
- solink_base = '$ld -shared $ldflags -o $lib %(suffix)s' |
+ solink_base = '$ld %(type)s $ldflags -o $lib %(suffix)s' |
mtime_preserving_solink_base = ( |
'if [ ! -e $lib -o ! -e ${lib}.TOC ] || ' |
# Always force dependent targets to relink if this library |
@@ -1914,20 +1915,19 @@ |
'{ otool -l $lib | grep LC_ID_DYLIB -A 5; ' |
'nm -gP $lib | cut -f1-2 -d\' \' | grep -v U$$; true; }'}) |
- # TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass |
- # -bundle -single_module here (for osmesa.so). |
solink_suffix = '$in $solibs $libs$postbuilds' |
master_ninja.rule( |
'solink', |
description='SOLINK $lib, POSTBUILDS', |
restat=True, |
- command=mtime_preserving_solink_base % {'suffix':solink_suffix}, |
+ command=mtime_preserving_solink_base % {'suffix': solink_suffix, |
+ 'type': '-shared'}, |
pool='link_pool') |
master_ninja.rule( |
'solink_notoc', |
description='SOLINK $lib, POSTBUILDS', |
restat=True, |
- command=solink_base % {'suffix':solink_suffix}, |
+ command=solink_base % {'suffix':solink_suffix, 'type': '-shared'}, |
Mark Mentovai
2013/09/05 14:29:37
Missing space before solink_suffix?
|
pool='link_pool') |
solink_module_suffix = '$in $solibs $libs$postbuilds' |
@@ -1935,13 +1935,14 @@ |
'solink_module', |
description='SOLINK(module) $lib, POSTBUILDS', |
restat=True, |
- command=mtime_preserving_solink_base % {'suffix':solink_module_suffix}, |
+ command=mtime_preserving_solink_base % {'suffix': solink_module_suffix, |
+ 'type': '-bundle'}, |
pool='link_pool') |
master_ninja.rule( |
'solink_module_notoc', |
description='SOLINK(module) $lib, POSTBUILDS', |
restat=True, |
- command=solink_base % {'suffix':solink_module_suffix}, |
+ command=solink_base % {'suffix': solink_module_suffix, 'type': '-bundle'}, |
pool='link_pool') |
master_ninja.rule( |