[PATCH] D144596: Add extra parameter to thinlto-prefix-replace
Ivan Tadeu Ferreira Antunes Filho via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 24 14:01:53 PST 2023
itf added a comment.
> Can Bazel rewrite `a.rsp` with content `xxx/a.o` to `xxx/random_hash/a.o`? It will create a new file but I don't think that's a bottleneck.
Currently there is no code in bazel, that reads and modifies a parameter file like `a.rsp`. It is possible to do so by, for example, calling a shell script / binary executable that modifies the file and saves a new one as one of the actions (like so: https://github.com/bazelbuild/examples/tree/main/rules/actions_run).
However, I'd argue that it is better for `lld` to have this extra argument. The link objects `.o` are outputs of actions that can be run in parallel, while the `thinlto.bc` and the `.import` files are a result of the thinlto indexing action which run in series, i.e. all the `thinlto.bc` are generated simultaneously. I find it unexpected that `lld` would force those files to be in the same folders, given that `thinlto-index-only=` is particularly useful for distributed thinLTO, where there could be restrictions on what can be saved in each location
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144596/new/
https://reviews.llvm.org/D144596
More information about the llvm-commits
mailing list