This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by Amir on Jan 26 2022, 1:22 PM.

Details

Summary

Fix tests to pass with clang-6..9 on Ubuntu 20.04.

Diff Detail

Event Timeline

Amir created this revision.Jan 26 2022, 1:22 PM
Amir requested review of this revision.Jan 26 2022, 1:22 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 26 2022, 1:22 PM
yota9 added inline comments.Jan 26 2022, 1:35 PM
bolt/test/X86/symtab-secondary-entries.test
5

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?

Amir added inline comments.Jan 26 2022, 1:47 PM
bolt/test/X86/symtab-secondary-entries.test
5

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).

yota9 added inline comments.Jan 26 2022, 1:51 PM
bolt/test/X86/symtab-secondary-entries.test
5

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 :)

yota9 accepted this revision.Jan 26 2022, 3:24 PM
This revision is now accepted and ready to land.Jan 26 2022, 3:24 PM
Amir edited the summary of this revision. (Show Details)Jan 26 2022, 5:07 PM
This revision was landed with ongoing or failed builds.Jan 26 2022, 5:13 PM
This revision was automatically updated to reflect the committed changes.