Skip to content

Commit 3e6b6ce

Browse files
committed
[lld/mac] Use libSystem.dylib instead of libSystem.B.dylib in tests
For -flat_namespace, lld needs to load dylibs in LC_LOAD_DYLIB. The current setup meant that libSystem.dylib would cause a LC_LOAD_DYLIB with libSystem.B.dylib, but that didn't exist in our libsysroot for tests. So just drop the .B. See https://reviews.llvm.org/D97641#2595237 and https://reviews.llvm.org/D97641#2595270
1 parent 2e803ec commit 3e6b6ce

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

lld/test/MachO/Inputs/MacOSX.sdk/usr/lib/libSystem.tbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
archs: [ x86_64, arm64 ]
33
uuids: [ 'x86_64: 00000000-0000-0000-0000-000000000000', 'arm64: 00000000-0000-0000-0000-000000000010' ]
44
platform: macosx
5-
install-name: '/usr/lib/libSystem.B.dylib'
5+
install-name: '/usr/lib/libSystem.dylib'
66
current-version: 0001.001.1
77
exports:
88
- archs: [ 'x86_64', 'arm64' ]

lld/test/MachO/Inputs/iPhoneSimulator.sdk/usr/lib/libSystem.tbd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
archs: [ i386, x86_64 ]
33
uuids: [ 'i386: 00000000-0000-0000-0000-000000000000', 'x86_64: 00000000-0000-0000-0000-000000000001' ]
44
platform: ios
5-
install-name: '/usr/lib/libSystem.B.dylib'
5+
install-name: '/usr/lib/libSystem.dylib'
66
current-version: 1281
77
exports:
88
- archs: [ i386, x86_64 ]

lld/test/MachO/implicit-dylibs.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
# LOAD: cmd LC_LOAD_DYLIB
6969
# LOAD-NEXT: cmdsize
70-
# LOAD-NEXT: name /usr/lib/libSystem.B.dylib
70+
# LOAD-NEXT: name /usr/lib/libSystem.dylib
7171
# LOAD: cmd LC_LOAD_DYLIB
7272
# LOAD-NEXT: cmdsize
7373
# LOAD-NEXT: name /System/Library/Frameworks/Foo.framework/Versions/A/Foo

lld/test/MachO/lc-linker-option.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# RUN: --implicit-check-not LC_LOAD_DYLIB
2222
# LIB: cmd LC_LOAD_DYLIB
2323
# LIB-NEXT: cmdsize
24-
# LIB-NEXT: name /usr/lib/libSystem.B.dylib
24+
# LIB-NEXT: name /usr/lib/libSystem.dylib
2525

2626
# RUN: llvm-as %t/invalid.ll -o %t/invalid.o
2727
# RUN: not %lld %t/invalid.o -o /dev/null 2>&1 | FileCheck --check-prefix=INVALID %s

lld/test/MachO/link-search-order.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@
4848

4949
# DYLIB: @executable_path/libhello.dylib
5050
# DYLIB: @executable_path/libgoodbye.dylib
51-
# DYLIB: /usr/lib/libSystem.B.dylib
51+
# DYLIB: /usr/lib/libSystem.dylib
5252

5353
# ARCHIVE: @executable_path/libhello.dylib
5454
# ARCHIVE-NOT: @executable_path/libgoodbye.dylib
55-
# ARCHIVE: /usr/lib/libSystem.B.dylib
55+
# ARCHIVE: /usr/lib/libSystem.dylib
5656

5757
.section __TEXT,__text
5858
.global _main

lld/test/MachO/stub-link.s

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
# LOAD: cmd LC_LOAD_DYLIB
2525
# LOAD-NEXT: cmdsize
26-
# LOAD-NEXT: name /usr/lib/libSystem.B.dylib
26+
# LOAD-NEXT: name /usr/lib/libSystem.dylib
2727
# LOAD-NEXT: time stamp
2828
# LOAD-NEXT: current version 1.1.1
2929
# LOAD-NEXT: compatibility version

lld/test/MachO/weak-import.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@
2424

2525
# WEAK-SYS: cmd LC_LOAD_WEAK_DYLIB
2626
# WEAK-SYS-NEXT: cmdsize
27-
# WEAK-SYS-NEXT: name /usr/lib/libSystem.B.dylib
27+
# WEAK-SYS-NEXT: name /usr/lib/libSystem.dylib
2828

2929
# WEAK-SYS: cmd LC_LOAD_WEAK_DYLIB
3030
# WEAK-SYS-NEXT: cmdsize
3131
# WEAK-SYS-NEXT: name /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
3232

3333
# SYS: cmd LC_LOAD_DYLIB
3434
# SYS-NEXT: cmdsize
35-
# SYS-NEXT: name /usr/lib/libSystem.B.dylib
35+
# SYS-NEXT: name /usr/lib/libSystem.dylib
3636

3737
# WEAK-FOO: cmd LC_LOAD_WEAK_DYLIB
3838
# WEAK-FOO-NEXT: cmdsize

0 commit comments

Comments
 (0)