[PATCH] D118282: [BOLT][TEST] Adjust tests for BOLT_CLANG_EXE=clang-{6..9}

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 26 13:51:34 PST 2022


yota9 added inline comments.


================
Comment at: bolt/test/X86/symtab-secondary-entries.test:5
+RUN:   %p/Inputs/user-order.S -o %t.o
+RUN: ld.lld %t.o --emit-relocs --nostdlib -o %t.exe
 RUN: llvm-bolt %t.exe -o %t -reorder-functions=user \
----------------
Amir wrote:
> yota9 wrote:
> > I don't really mind to use linker directly, but I prefer to use it through compiler, it may send extra flags that linker may expect like -m <arch>, crt files, lib paths & etc, it just seems more universal solution for me, although this way seems to be fine too :) What do you think?
> I think it's problematic to rely on implicit compiler behavior wrt linking. Ideally, tests don't need to rely on system libraries at all. I completely agree that compiling assembly is a lot more convenient with the compiler toolchain, but for tests I think it's best to make it more explicit (at least where we can, e.g. for assembly tests).
Well it is more convenient and might be more robust, but I see what you mean. Also we might need to add %ldflags for such tests :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118282



More information about the llvm-commits mailing list