Revert 227347 "Run strip via xcrun."
When the SDK is set to something that Xcode doesn't know about (such as 10.6), xcrun doesn't work correctly. mark@cougar bash$ xcrun strip /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: no files specified mark@cougar bash$ SDKROOT=/SDKs/MacOSX10.6.sdk xcrun strip xcodebuild: error: SDK "/SDKs/MacOSX10.6.sdk" cannot be located. xcrun: error: unable to find utility "strip", not a developer tool or in PATH > Run strip via xcrun. > > In Xcode 5, strip is no longer in SYSTEM_DEVELOPER_BIN_DIR. It is only in > DT_TOOLCHAIN_DIR. I also checked Xcode 4.6.1 and found that DT_TOOLCHAIN_DIR > was also set there, and strip is in both SYSTEM_DEVELOPER_BIN_DIR and > DT_TOOLCHAIN_DIR in that version. > > Environment variables as set when Xcode is installed at /Applications/Xcode.app: > > SYSTEM_DEVELOPER_BIN_DIR=/Applications/Xcode.app/Contents/Developer/usr/bin > DT_TOOLCHAIN_DIR=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefa > ult.xctoolchain > > xcrun should be able to find strip without having to resort to manual > environment interpretation. > > R=thakis@chromium.org > > Review URL: https://codereview.chromium.org/24352006 TBR=mark@chromium.org Review URL: https://codereview.chromium.org/26235007 git-svn-id: http://src.chromium.org/svn/trunk/src/build@227524 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
ee974b2625
Коммит
a8aa673f38
|
@ -276,7 +276,13 @@ def strip_and_make_fake_dsym(macho):
|
|||
# Strip the Mach-O file
|
||||
remove_dsym = True
|
||||
try:
|
||||
strip_cmdline = ['xcrun', 'strip'] + sys.argv[1:]
|
||||
strip_path = ""
|
||||
if "SYSTEM_DEVELOPER_BIN_DIR" in os.environ:
|
||||
strip_path = os.environ["SYSTEM_DEVELOPER_BIN_DIR"]
|
||||
else:
|
||||
strip_path = "/usr/bin"
|
||||
strip_path = os.path.join(strip_path, "strip")
|
||||
strip_cmdline = [strip_path] + sys.argv[1:]
|
||||
strip_cmd = subprocess.Popen(strip_cmdline)
|
||||
if strip_cmd.wait() == 0:
|
||||
remove_dsym = False
|
||||
|
|
Загрузка…
Ссылка в новой задаче