<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/mac pulls in too many frameworks, making executables not run on older macOS versions"
href="https://bugs.llvm.org/show_bug.cgi?id=50304">50304</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>lld/mac pulls in too many frameworks, making executables not run on older macOS versions
</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><a href="https://drive.google.com/file/d/1Alaz9ZtJ8QhoXdzJAFlt3UPiN02VLN-t/view?usp=sharing">https://drive.google.com/file/d/1Alaz9ZtJ8QhoXdzJAFlt3UPiN02VLN-t/view?usp=sharing</a>
% ld @response.txt
% otool -L gl_unittests | grep PDF
% ~/src/llvm-project/out/gn/bin/ld64.lld @response.txt
ld64.lld: warning: Option `-dead_strip' is not yet implemented. Stay tuned...
% otool -L gl_unittests | grep PDF
/System/Library/Frameworks/PDFKit.framework/Versions/A/PDFKit
(compatibility version 1.0.0, current version 1.0.0)
This causes the binary to not run on macOS 10.14, where PDFKit apparently
doesn't exist at that path (?)
Not sure yet why this framework gets pulled in.
% otool -vh /System/Library/Frameworks/PDFKit.framework/Versions/A/PDFKit
/System/Library/Frameworks/PDFKit.framework/Versions/A/PDFKit:
Mach header
magic cputype cpusubtype caps filetype ncmds sizeofcmds flags
MH_MAGIC_64 X86_64 ALL 0x00 DYLIB 27 4120 NOUNDEFS
DYLDLINK TWOLEVEL NO_REEXPORTED_DYLIBS APP_EXTENSION_SAFE
That doesn't include DEAD_STRIPPABLE_DYLIB, so it's not just us not yet
stripping dylibs with that set.
(I believe this bug is the cause for the majority of the failures on
<a href="https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/677679/overview">https://ci.chromium.org/ui/p/chromium/builders/try/mac-rel/677679/overview</a> -- a
run where I run chromium's unit tests with the linker set to lld. Lots of green
already!)</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>