[PATCH] D51055: [ELF] -thinlto-object-suffix-replace=: don't error if the path does not end with old suffix

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 12:59:44 PDT 2018


tejohnson added inline comments.


================
Comment at: ELF/InputFiles.cpp:1294
+  if (Path.consume_back(Suffix))
+    return (Path + Repl).str();
+  return Path;
----------------
MaskRay wrote:
> tejohnson wrote:
> > This is still different than what gold-plugin currently does, which is to always append the new suffix. It would be good to make these do the same thing. With this version as opposed to gold plugin's, there is no way to simply append a new suffix, if we ever wanted to do that (not sure).
> Is it possible to change `tools/gold/gold-plugin.cpp` for the incompatibility?
> Currently for `-thinlto-object-suffix-replace=.indexing.o\;.o`, if a `foo.o` is given, `foo.o.o.thinlto.bc` will be generated.
> I think `foo.o.thinlto.bc` (what this patch makes lld do) looks better
It depends on how we expect the option to be used. lld was essentially codifying (with the error being removed here), how we use this option in practice, which is to allow distributed build thin link processes to accept minimized bitcode versions of files being built (minimized to remove the IR that we don't care about during the thin link). In reality, at least how we have used this in the Bazel build system until now, all bitcode files have a minimized version, so we never encountered this situation before.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D51055





More information about the llvm-commits mailing list