<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 - Regression(fc5d804ddbe): lld can't link simple binary"
href="https://bugs.llvm.org/show_bug.cgi?id=50079">50079</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Regression(fc5d804ddbe): lld can't link simple binary
</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>thakis@MBP llvm-project % cat main.s
.globl _main
_main:
retq
thakis@MBP llvm-project % out/gn/bin/clang main.s
thakis@MBP llvm-project % out/gn/bin/clang main.s -fuse-ld=lld
ld64.lld: warning: Option `-no_deduplicate' is not yet implemented. Stay
tuned...
ld64.lld: error: /usr/lib/system/libsystem_kernel.dylib has platform
macCatalyst, which is different from target platform macOS
ld64.lld: error: /usr/lib/system/libsystem_platform.dylib has platform
macCatalyst, which is different from target platform macOS
ld64.lld: error: /usr/lib/system/libsystem_pthread.dylib has platform
macCatalyst, which is different from target platform macOS
clang: error: linker command failed with exit code 1 (use -v to see invocation)
thakis@MBP llvm-project % file /usr/lib/system/libsystem_platform.dylib
/usr/lib/system/libsystem_platform.dylib: Mach-O universal binary with 2
architectures: [x86_64:Mach-O 64-bit dynamically linked shared library x86_64]
[i386:Mach-O dynamically linked shared library i386]
/usr/lib/system/libsystem_platform.dylib (for architecture x86_64): Mach-O
64-bit dynamically linked shared library x86_64
/usr/lib/system/libsystem_platform.dylib (for architecture i386): Mach-O
dynamically linked shared library i386
% otool -l /usr/lib/system/libsystem_platform.dylib | grep -i -C4 platf
/usr/lib/system/libsystem_platform.dylib:
Load command 0
cmd LC_SEGMENT_64
cmdsize 632
segname __TEXT
--
--
flags 0x0
Load command 3
cmd LC_ID_DYLIB
cmdsize 72
name /usr/lib/system/libsystem_platform.dylib (offset 24)
time stamp 1 Wed Dec 31 19:00:01 1969
current version 220.100.1
compatibility version 1.0.0
Load command 4
--
--
sdk 10.15.6
Load command 9
cmd LC_BUILD_VERSION
cmdsize 32
platform 6
minos 13.6
sdk 13.6
ntools 1
tool 3
I'm using Xcode 12.4 on intel macOS 10.15.7 . Not sure why lld thinks that
/usr/lib/system/libsystem_platform.dylib is for catalyst?</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>