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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 12:49:02 PDT 2018


MaskRay added inline comments.


================
Comment at: ELF/InputFiles.cpp:1294
+  if (Path.consume_back(Suffix))
+    return (Path + Repl).str();
+  return Path;
----------------
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


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D51055





More information about the llvm-commits mailing list