[PATCH] D144596: [lld] Support separate native object file path in --thinlto-prefix-replace

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 3 15:22:53 PDT 2023


tejohnson added inline comments.


================
Comment at: lld/test/ELF/lto/thinlto-index-file-object-prefix-replace.ll:41
+; RUN: not ld.lld --thinlto-prefix-replace="old/;new/;obj/" -shared old/subdir/1.o old/subdir/2.o old/3.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR
+; ERR: thinlto-prefix-replace
+
----------------
tejohnson wrote:
> MaskRay wrote:
> > Here and throughout, always include `error:` for an error message, and try including the input filename.
> > 
> I believe what @MaskRay meant was to match the "error:" from the error message that this presumably comes from (and the input filename assuming that is in the error message I guess?) - I would just go ahead and match the full error message output.
Still missing the "error:". I.e. I assume the full output is something like:

error: --thinlto-prefix-replace=old_dir;new_dir;obj_dir must be used with --thinlto-index-only=

I think @MaskRay would like the entire message matched.


================
Comment at: llvm/tools/gold/gold-plugin.cpp:896
+        OldPrefix, NewPrefix,
+        // TODO: add support for NativeObjectPrefix
+        /*NativeObjectPrefix=*/"", options::thinlto_emit_imports_files,
----------------
Maybe:

// TODO: Add support for optional native object path in thinlto_prefix_replace option to match lld.


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

https://reviews.llvm.org/D144596



More information about the llvm-commits mailing list