[PATCH] D104353: [lld-macho] Avoid force-loading the same archive twice

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 16 10:35:45 PDT 2021


thakis accepted this revision.
thakis added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lld/test/MachO/force-load.s:21
+## arguments, so this is an error.
+# RUN: cd %t; not %lld %t/foo.o -force_load %t/foo.a -force_load foo.a \
+# RUN:   %t/test.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=DUP
----------------
Hm, should we have an explicit test for this? ld64 does seem to do realpath(), and we kind of want to do that at some point too. So it seems a bit strange to have a test preventing this.

(My local ld64 test:
```
% ln -s libfoo.a libbar.a
% clang mainfoo.o libfoo.a -force_load libfoo.a -force_load libfoo.a -lfoo -L . libbar.a ../llvm-project/libfoo.a
```
)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104353/new/

https://reviews.llvm.org/D104353



More information about the llvm-commits mailing list