[PATCH] D130229: [ELF] Add --thinlto-index= and --remapping-file=

Wei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 13:50:23 PDT 2022


weiwang added a comment.

In D130229#3669826 <https://reviews.llvm.org/D130229#3669826>, @tejohnson wrote:

> In D130229#3669754 <https://reviews.llvm.org/D130229#3669754>, @weiwang wrote:
>
>> In D130229#3669642 <https://reviews.llvm.org/D130229#3669642>, @tejohnson wrote:
>>
>>>> If there is a case, we probably have to give --remapping-file additional semantics that a specified file ignores the surrounding `--start-lib`. This makes  --remapping-file less generic, but we can probably add the third column to indicate whether --start-lib should be ignored.
>>>
>>> Can we just have the file generated by thinlto-index-only= also include native objects?
>>
>> I agree that making `thinlto-index-only=` to produce the entire input list, both prebuilt native and bitcode-compiled native, is a less disruptive change to still keep the current cmdline options while making it more general. I think we can probably extend the the index file output to also include `--start-lib/--end-lib` grouping to that the final link can just use it as is.
>
> Actually we specifically don't want to do that (include the selected objects in --start-lib/--end-lib in the index output), we already know which files the linker chose to include from the archive groupings and we don't want to redo that logic which could theoretically come to a different conclusion.

Right. Linker already fetched those lazy objects, both native and bitcode, when building symbol table during thinlink, so they are not lazy anymore. The index file would include those needed for final linking.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130229



More information about the llvm-commits mailing list