Commit 159a0955 authored by Mark Mentovai's avatar Mark Mentovai Committed by Commit Bot

mac: Include libcodedirectory.dylib in Xcode hermetic toolchains

In Xcode 12.2b2, strip and some other tools depend on a new library,
libcodedirectory.dylib. It needs to be included in the hermetic
toolchain packages, otherwise, links that request stripping will produce
errors such as:

[9770/76120] LINK clang_x64/symupload
FAILED: clang_x64/symupload clang_x64/symupload.dSYM/Contents/Info.plist clang_x64/symupload.dSYM/Contents/Resources/DWARF/symupload
TOOL_VERSION=1601523428 ../../build/toolchain/mac/linker_driver.py -Wcrl,strippath,../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip ../../third_party/llvm-build/Release+Asserts/bin/clang++ -B ../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/  -Wcrl,dsym,clang_x64 -Wcrl,dsymutilpath,../../tools/clang/dsymutil/bin/dsymutil  -Wl,-fatal_warnings -stdlib=libc++ -arch x86_64 -Wl,-dead_strip -Wl,-no_data_in_code_info -Wl,-no_function_starts -nostdlib++ -isysroot ../../build/mac_files/xcode_binaries/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk -mmacosx-version-min=10.10.0 -Wl,-ObjC -Wcrl,strip,-x,-S -Werror -o "clang_x64/symupload" -Wl,-filelist,"clang_x64/symupload.rsp" -framework Foundation
dyld: Library not loaded: @rpath/libcodedirectory.dylib
  Referenced from: /opt/s/w/ir/cache/builder/src/out/Release/../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
  Reason: image not found
Traceback (most recent call last):
  File "../../build/toolchain/mac/linker_driver.py", line 287, in <module>
    Main(sys.argv)
  File "../../build/toolchain/mac/linker_driver.py", line 103, in Main
    linker_driver_outputs += linker_driver_actions[name](args)
  File "../../build/toolchain/mac/linker_driver.py", line 137, in <lambda>
    lambda full_args: action(sub_arg[len(name):], full_args))
  File "../../build/toolchain/mac/linker_driver.py", line 223, in RunStrip
    subprocess.check_call(strip_command)
  File "/opt/s/w/ir/cipd_bin_packages/cpython/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['../../build/mac_files/xcode_binaries/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip', '-x', '-S', 'clang_x64/symupload']' returned non-zero exit status -6

This is relevant to the mac-arm64 official build.

Bug: 1134565
Change-Id: I9b20dd6b740117056739065d35c5016567af0935
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2445909
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#813170}
parent 97cf2e13
......@@ -29,9 +29,10 @@ data:
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/size-classic
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libtapi.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libcodedirectory.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libswiftDemangle.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libtapi.dylib
- file: Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/libexec/migcom
- file: Contents/Developer/usr/bin/atos
- file: Contents/Resources/English.lproj/License.rtf
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment