[lld] [lld][NFC] Precommit test for ld -r links FatLTO PIC objects (PR #92817)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 10:43:47 PDT 2024
================
@@ -4,13 +4,23 @@
; RUN: rm -rf %t && split-file %s %t
;; Ensure that input files contain .llvm.lto section.
-; RUN: llc %t/a-LTO.ll --filetype=obj -o %t/a-fatLTO.o
+; RUN: llc %t/a-LTO.ll --filetype=obj -o %t/a-fatLTO.o --relocation-model=pic
; RUN: opt < %t/a-LTO.ll --module-summary -o %t/a-fatLTO.bc
-; RUN: llvm-objcopy --add-section=.llvm.lto=%t/a-fatLTO.bc --set-section-flags=.llvm.lto=exclude %t/a-fatLTO.o
+; RUN: llvm-objcopy --add-section=.llvm.lto=%t/a-fatLTO.bc --set-section-flags=.llvm.lto=exclude --set-section-type=.llvm.lto=0x6fff4c0c %t/a-fatLTO.o
----------------
ilovepi wrote:
I know that you prefer the `cd` approach, but I find it hard to re-run commands that require a `cd` into a temp directory when iterating on tests. Leaving `%t/` in the paths allow me to easily copy the failing command and run it from the build directory. If you feel strongly, I can still change it, but my preference is to leave this as is.
https://github.com/llvm/llvm-project/pull/92817
More information about the llvm-commits
mailing list