This adds the -lto-obj-path option to lld-link. This can be
used to specify a path at which to write a native object file for
the full LTO part when using LTO unit splitting.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 36447 Build 36446: arc lint + arc unit
Event Timeline
I think the command line flag needs a better name to indicate that it's the destination for the merged, whole-program bitcode file. In ELF, the config name is ltoObjPath, and the flag is -plugin-opt=obj-path=. I think we can be more descriptive. How about: -split-bc-path:, -merged-bc-path:, -lto-bc-path, or something else descriptive?
In ELF, the config name is ltoObjPath, and the flag is -plugin-opt=obj-path=
Yes. That's how I came up with -thinlto-obj-path. All the ThinLTO options that are -plugin-opt=??? in the ELF are -thinlto-??? in the COFF linker.
That said, I'm not opposed to giving this a more descriptive name. Since this is the path to the native object file we get out of LTO, how about -lto-merged-obj?
After discussion in person, we decided on -lto-obj-path: similar to the naming in the ELF linker, and we'