[PATCH] D146778: [lld] Preliminary fat-lto-object support

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 19:03:36 PDT 2023


MaskRay added a comment.

`man lld/docs/ld.lld.1`. Can you also add the option to the manpage?



================
Comment at: lld/test/ELF/fatlto/fatlto.test:6
+
+;; Ensure that input files contain .llvm.lto section
+; RUN: llc %t/a-LTO.ll --filetype=obj -o %t/a-fatLTO.o
----------------
Ditto everywhere


================
Comment at: lld/test/ELF/fatlto/fatlto.test:9
+; RUN: llvm-as %t/a-LTO.ll -o %t/a-fatLTO.bc
+; RUN: llvm-objcopy --add-section=.llvm.lto=%t/a-fatLTO.bc %t/a-fatLTO.o
+; RUN: llvm-objcopy --set-section-flags=.llvm.lto=exclude %t/a-fatLTO.o
----------------
`--add-section=.llvm.lto=%t/a-fatLTO.bc --set-section-flags=.llvm.lto=exclude`


================
Comment at: lld/test/ELF/fatlto/fatlto.test:11
+; RUN: llvm-objcopy --set-section-flags=.llvm.lto=exclude %t/a-fatLTO.o
+; RUN: llvm-readobj -S %t/a-fatLTO.o | FileCheck --check-prefix=CHECK-A %s
+
----------------
This `llvm-readobj -S %t/a-fatLTO.o` check is unneeded. The operation is tested in test/tools/llvm-objcopy/ELF.


================
Comment at: lld/test/ELF/fatlto/fatlto.test:19
+; RUN: llvm-objcopy --set-section-flags=.llvm.lto=exclude %t/main-fatLTO.o
+; RUN: llvm-readobj -S %t/main-fatLTO.o | FileCheck --check-prefix=CHECK-MAIN %s
+
----------------
This llvm-readobj -S %t/main-fatLTO.o check is unneeded.


================
Comment at: lld/test/ELF/fatlto/fatlto.test:27
+
+;; Check that fat objects work w/ s=--start-lib
+; RUN: ld.lld -o %t/foo-fatLTO.start_lib --start-lib %t/a-fatLTO.o %t/main-fatLTO.o --fat-lto-objects
----------------



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146778



More information about the llvm-commits mailing list