diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-10-08 17:52:37 +0000 |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2006-10-08 17:52:37 +0000 |
commit | 115930d981e3322f085cecd1954ad381b65cfd25 (patch) | |
tree | 4ee92f8196968b7abebb9692e62c4f9af586a65e | |
parent | bf4358a0a90c91eec6fcfbbc445e830f04e84769 (diff) | |
download | cpython-git-115930d981e3322f085cecd1954ad381b65cfd25.tar.gz |
Backport of r52236
-rw-r--r-- | Lib/distutils/unixccompiler.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/distutils/unixccompiler.py b/Lib/distutils/unixccompiler.py index 6cd14f7728..d1fd1d9511 100644 --- a/Lib/distutils/unixccompiler.py +++ b/Lib/distutils/unixccompiler.py @@ -82,6 +82,22 @@ def _darwin_compiler_fixup(compiler_so, cc_args): except ValueError: pass + # Check if the SDK that is used during compilation actually exists, + # the universal build requires the usage of a universal SDK and not all + # users have that installed by default. + sysroot = None + if '-isysroot' in cc_args: + idx = cc_args.index('-isysroot') + sysroot = cc_args[idx+1] + elif '-isysroot' in compiler_so: + idx = compiler_so.index('-isysroot') + sysroot = compiler_so[idx+1] + + if sysroot and not os.path.isdir(sysroot): + log.warn("Compiling with an SDK that doesn't seem to exist: %s", + sysroot) + log.warn("Please check your Xcode installation") + return compiler_so class UnixCCompiler(CCompiler): |