[llvm-bugs] [Bug 51218] New: lld is confused by xctest reexports in xcode 13 sdk
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 26 07:38:54 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51218
Bug ID: 51218
Summary: lld is confused by xctest reexports in xcode 13 sdk
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: gkm at fb.com, jezreel at gmail.com,
llvm-bugs at lists.llvm.org, smeenai at fb.com
% clang -x c /dev/null -o empty.o -c --target=arm64-apple-ios -isysroot
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
% ld -demangle -dynamic -dylib -arch arm64 -platform_version ios 13.0.0 15.0
-syslibroot
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
-o foo.o -framework XCTest -why_load -lSystem
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/lib/darwin/libclang_rt.ios.a
-Fxcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
empty.o
^ Works
% ~/src/llvm-project/out/gn/bin/ld64.lld -demangle -dynamic -dylib -arch arm64
-platform_version ios 13.0.0 15.0 -syslibroot
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk
-o foo.o -framework XCTest -why_load -lSystem
/Users/thakis/src/chrome/src/third_party/llvm-build/Release+Asserts/lib/clang/13.0.0/lib/darwin/libclang_rt.ios.a
-Fxcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks
empty.o
ld64.lld: error: unable to locate re-export with install name
@rpath/XCTestCore.framework/XCTestCore exported from
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest
ld64.lld: error: unable to locate re-export with install name
@rpath/XCUnit.framework/XCUnit exported from
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest
ld64.lld: error: unable to locate re-export with install name
@rpath/XCUIAutomation.framework/XCUIAutomation exported from
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest
^ doesn't
I don't quite get _why_ ld64 can do this. Here are the reexport entries:
% otool -arch arm64 -l
xcode-13/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework/XCTest
| grep -A2 REEXPORT
cmd LC_REEXPORT_DYLIB
cmdsize 64
name @rpath/XCTestCore.framework/XCTestCore (offset 24)
--
cmd LC_REEXPORT_DYLIB
cmdsize 56
name @rpath/XCUnit.framework/XCUnit (offset 24)
--
cmd LC_REEXPORT_DYLIB
cmdsize 72
name @rpath/XCUIAutomation.framework/XCUIAutomation (offset 24)
Does the rpath for a framework include the framework's parent dir?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210726/1dc934f9/attachment-0001.html>
More information about the llvm-bugs
mailing list