<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - lld is confused by xctest reexports in xcode 13 sdk"
href="https://bugs.llvm.org/show_bug.cgi?id=51218">51218</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld is confused by xctest reexports in xcode 13 sdk
</td>
</tr>
<tr>
<th>Product</th>
<td>lld
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>MachO
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nicolasweber@gmx.de
</td>
</tr>
<tr>
<th>CC</th>
<td>gkm@fb.com, jezreel@gmail.com, llvm-bugs@lists.llvm.org, smeenai@fb.com
</td>
</tr></table>
<p>
<div>
<pre>% 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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>