File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -627,10 +627,14 @@ def replace_in_all(search, replace):
627627 replace_in_file(MAKEFILE, search, replace)
628628 replace_in_file(SYSCONFIGDATA, search, replace)
629629
630- # Replace the XCode path with a generic value.
630+ # Remove the Xcode path from the compiler flags.
631+ #
632+ # CPython itself will drop this from ` sysconfig.get_config_var(" CFLAGS" )` and
633+ # similar calls, but _not_ if ` CFLAGS` is set in the environment (regardless of
634+ # the ` CFLAGS` value). It will almost always be wrong, so we drop it unconditionally.
631635xcode_path = os.getenv("APPLE_SDK_PATH")
632636if xcode_path:
633- replace_in_all(xcode_path, "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk ")
637+ replace_in_all("-isysroot %s" % xcode_path, "")
634638
635639# -fdebug-default-version is Clang only. Strip so compiling works on GCC.
636640replace_in_all("-fdebug-default-version=4", "")
You can’t perform that action at this time.
0 commit comments