@@ -579,7 +579,8 @@ def GetCflags(self, configname, arch=None):
579
579
580
580
sdk_root = self ._SdkPath ()
581
581
if "SDKROOT" in self ._Settings () and sdk_root :
582
- cflags .append ("-isysroot %s" % sdk_root )
582
+ cflags .append ("-isysroot" )
583
+ cflags .append (sdk_root )
583
584
584
585
if self .header_map_path :
585
586
cflags .append ("-I%s" % self .header_map_path )
@@ -664,7 +665,8 @@ def GetCflags(self, configname, arch=None):
664
665
# TODO: Supporting fat binaries will be annoying.
665
666
self ._WarnUnimplemented ("ARCHS" )
666
667
archs = ["i386" ]
667
- cflags .append ("-arch " + archs [0 ])
668
+ cflags .append ("-arch" )
669
+ cflags .append (archs [0 ])
668
670
669
671
if archs [0 ] in ("i386" , "x86_64" ):
670
672
if self ._Test ("GCC_ENABLE_SSE3_EXTENSIONS" , "YES" , default = "NO" ):
@@ -924,17 +926,15 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
924
926
self ._AppendPlatformVersionMinFlags (ldflags )
925
927
926
928
if "SDKROOT" in self ._Settings () and self ._SdkPath ():
927
- ldflags .append ("-isysroot " + self ._SdkPath ())
929
+ ldflags .append ("-isysroot" )
930
+ ldflags .append (self ._SdkPath ())
928
931
929
932
for library_path in self ._Settings ().get ("LIBRARY_SEARCH_PATHS" , []):
930
933
ldflags .append ("-L" + gyp_to_build_path (library_path ))
931
934
932
935
if "ORDER_FILE" in self ._Settings ():
933
- ldflags .append (
934
- "-Wl,-order_file "
935
- + "-Wl,"
936
- + gyp_to_build_path (self ._Settings ()["ORDER_FILE" ])
937
- )
936
+ ldflags .append ("-Wl,-order_file" )
937
+ ldflags .append ("-Wl," + gyp_to_build_path (self ._Settings ()["ORDER_FILE" ]))
938
938
939
939
if not gyp .common .CrossCompileRequested ():
940
940
if arch is not None :
@@ -946,15 +946,18 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
946
946
# TODO: Supporting fat binaries will be annoying.
947
947
self ._WarnUnimplemented ("ARCHS" )
948
948
archs = ["i386" ]
949
- ldflags .append ("-arch " + archs [0 ])
949
+ # Avoid quoting the space between -arch and the arch name
950
+ ldflags .append ("-arch" )
951
+ ldflags .append (archs [0 ])
950
952
951
953
# Xcode adds the product directory by default.
952
954
# Rewrite -L. to -L./ to work around http://www.openradar.me/25313838
953
955
ldflags .append ("-L" + (product_dir if product_dir != "." else "./" ))
954
956
955
957
install_name = self .GetInstallName ()
956
958
if install_name and self .spec ["type" ] != "loadable_module" :
957
- ldflags .append ("-install_name " + install_name .replace (" " , r"\ " ))
959
+ ldflags .append ("-install_name" )
960
+ ldflags .append (install_name .replace (" " , r"\ " ))
958
961
959
962
for rpath in self ._Settings ().get ("LD_RUNPATH_SEARCH_PATHS" , []):
960
963
ldflags .append ("-Wl,-rpath," + rpath )
@@ -971,7 +974,8 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
971
974
platform_root = self ._XcodePlatformPath (configname )
972
975
if sdk_root and platform_root :
973
976
ldflags .append ("-F" + platform_root + "/Developer/Library/Frameworks/" )
974
- ldflags .append ("-framework XCTest" )
977
+ ldflags .append ("-framework" )
978
+ ldflags .append ("XCTest" )
975
979
976
980
is_extension = self ._IsIosAppExtension () or self ._IsIosWatchKitExtension ()
977
981
if sdk_root and is_extension :
@@ -987,7 +991,8 @@ def GetLdflags(self, configname, product_dir, gyp_to_build_path, arch=None):
987
991
+ "/System/Library/PrivateFrameworks/PlugInKit.framework/PlugInKit"
988
992
)
989
993
else :
990
- ldflags .append ("-e _NSExtensionMain" )
994
+ ldflags .append ("-e" )
995
+ ldflags .append ("_NSExtensionMain" )
991
996
ldflags .append ("-fapplication-extension" )
992
997
993
998
self ._Appendf (ldflags , "CLANG_CXX_LIBRARY" , "-stdlib=%s" )
0 commit comments