https://bugs.llvm.org/show_bug.cgi?id=50079
Bug ID: 50079
Summary: Regression(fc5d804ddbe): lld can't link simple binary
Product: lld
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: MachO
Assignee: unassignedb...@nondot.org
Reporter: nicolaswe...@gmx.de
CC: g...@fb.com, jezr...@gmail.com,
llvm-bugs@lists.llvm.org, smee...@fb.com
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?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs