[PATCH] D81113: lld: add basic static library search
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 3 15:29:29 PDT 2020
int3 marked an inline comment as done.
int3 added a comment.
Doing it in two steps is fine :)
================
Comment at: lld/test/MachO/static-link.s:2-4
+# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %p/Inputs/libhello.s -o %t/hello.o
+# RUN: llvm-mc -filetype obj -triple x86_64-apple-darwin %p/Inputs/libgoodbye.s -o %t/goodbye.o
+# RUN: lld -flavor darwinnew -dylib -install_name @executable_path/libhello.dylib %t/hello.o -o %t/libhello.dylib
----------------
The inclusion of a dylib symbol here seems unrelated to the static linking behavior. Let's try to keep the tests as targeted as possible. Also, static GOTPCREL relocations won't work correctly before {D80857} lands. I think we should just do normal symbol lookup (i.e. X86_64_RELOC_SIGNED), and use `llvm-objdump --section-headers --syms -d` to check that the resulting code has the correct relocated addresses. `relocation.s` should be a good reference.
================
Comment at: lld/test/MachO/static-link.s:9
+
+# REQUIRES: x86
+
----------------
we usually put this as the first line in the file
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81113/new/
https://reviews.llvm.org/D81113
More information about the llvm-commits
mailing list