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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 12:02:24 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/ELF/Options.td:648
+defm fat_lto_objects: BB<"fat-lto-objects",
+    "Use the embedded bitcode in the .llvm.lto section of the object file",
+    "Use the assembly in the object file (default)">;
----------------
relocatable object file


================
Comment at: lld/docs/ReleaseNotes.rst:34
 
+- Support LTO with LLVM FatLTO objects by adding the `-fat-lto-objects` flag.
+  Without `-fat-lto-objects`, LLD will link Fat LTO objects without LTO.
----------------
MaskRay wrote:
> Double backsticks. Prefer `option` over `flag` especially for linkers.
> ``--fat-lto-objects`` option is added to support LLVM FatLTO.


================
Comment at: lld/docs/ld.lld.1:624-627
+.It Fl --no-fat-lto-objects
+Use traditional linking with the .text object code section of fat lto object files.
+.It Fl --fat-lto-objects
+Use LTO with the .llvm.lto bitcode section of fat lto object files.
----------------
paulkirth wrote:
> I think this reads pretty naturally, but I'll defer to @MaskRay on the final text.
Perhaps
```
.It Fl -fat-lto-objects
Use the .llvm.lto section, which contains LLVM bitcode, in fat LTO object files to perform LTO.
.It Fl -no-fat-lto-objects
Ignore the .llvm.lto section in relocatable object files (default).
```

You can use `man docs/ld.lld.1` to check the content. `Fl` appends a dash itself...


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