[PATCH] D103998: [lld/mac] Make framework symlinks in tests more realistic

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 9 17:31:40 PDT 2021


thakis created this revision.
thakis added a reviewer: lld-macho.
Herald added a reviewer: gkm.
Herald added a project: lld-macho.
thakis requested review of this revision.

In a framework Foo.framework, Foo.framework/Foo is usually a relative
symbolic link to Foo.framework/Versions/Current/Foo,
and Foo.framework/Versions/Current is usually a relative symbolic
link to A.

Our tests used absolute symbolic links. Now they use relative symbolic links.

No behavior change, just makes the tests more representative of the real world.

(implicit-dylib.s omits the "Current" folder too, but I'm not changing that
here.)


https://reviews.llvm.org/D103998

Files:
  lld/test/MachO/framework.s
  lld/test/MachO/implicit-dylibs.s


Index: lld/test/MachO/implicit-dylibs.s
===================================================================
--- lld/test/MachO/implicit-dylibs.s
+++ lld/test/MachO/implicit-dylibs.s
@@ -26,18 +26,18 @@
 ## Bar.framework is nested within Foo.framework.
 # RUN: %lld -dylib -lSystem %t/framework-bar.o -o %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \
 # RUN:   -install_name /System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar
-# RUN: ln -sf %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Versions/A/Bar \
+# RUN: ln -sf Versions/A/Bar \
 # RUN:   %t/System/Library/Frameworks/Foo.framework/Frameworks/Bar.framework/Bar
 
 ## Have Foo re-export Bar.
 # RUN: %lld -dylib -F %t/System/Library/Frameworks/Foo.framework/Frameworks \
 # RUN:   -framework Bar -sub_umbrella Bar -lSystem %t/framework-foo.o -o %t/System/Library/Frameworks/Foo.framework/Versions/A/Foo \
 # RUN:   -install_name /System/Library/Frameworks/Foo.framework/Versions/A/Foo
-# RUN: ln -sf %t/System/Library/Frameworks/Foo.framework/Versions/A/Foo %t/System/Library/Frameworks/Foo.framework/Foo
+# RUN: ln -sf Versions/A/Foo %t/System/Library/Frameworks/Foo.framework/Foo
 
 # RUN: %lld -dylib -lSystem %t/framework-baz.o -o %t/Baz.framework/Versions/A/Baz \
 # RUN:   -install_name %t/Baz.framework/Versions/A/Baz
-# RUN: ln -sf %t/Baz.framework/Versions/A/Baz %t/Baz.framework/Baz
+# RUN: ln -sf Versions/A/Baz %t/Baz.framework/Baz
 
 # RUN: %lld -dylib -syslibroot %t -framework Foo -F %t -framework Baz \
 # RUN:   -lc++ -ltoplevel -lunused %t/usr/lib/system/libsublevel.dylib %t/libfoo.dylib \
Index: lld/test/MachO/framework.s
===================================================================
--- lld/test/MachO/framework.s
+++ lld/test/MachO/framework.s
@@ -4,8 +4,8 @@
 # RUN: mkdir -p %t/Foo.framework/Versions/A
 # RUN: %lld -dylib -install_name %t/Foo.framework/Versions/A/Foo %t/foo.o -o %t/Foo.framework/Versions/A/Foo
 # RUN: %lld -dylib -install_name %t/Foo.framework/Versions/A/Foobar %t/foo.o -o %t/Foo.framework/Versions/A/Foobar
-# RUN: ln -sf %t/Foo.framework/Versions/A %t/Foo.framework/Versions/Current
-# RUN: ln -sf %t/Foo.framework/Versions/Current/Foo %t/Foo.framework/Foo
+# RUN: ln -sf A %t/Foo.framework/Versions/Current
+# RUN: ln -sf Versions/Current/Foo %t/Foo.framework/Foo
 
 # RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/test.s -o %t/test.o
 # RUN: %lld -lSystem -F%t -framework Foo %t/test.o -o %t/test


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103998.351015.patch
Type: text/x-patch
Size: 2510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210610/b349cd99/attachment.bin>


More information about the llvm-commits mailing list