[ELF] Support -plugin-opt=stats-file=
authorAlex Richardson <alexrichardson@google.com>
Mon, 9 May 2022 14:51:02 +0000 (14:51 +0000)
committerAlex Richardson <alexrichardson@google.com>
Mon, 9 May 2022 15:04:40 +0000 (15:04 +0000)
commit7c20e7ca8642bafa44f5829a14deea5f9b37f0ef
tree5a14e1656becfcbf16d4cf3c12ba1f14d09c9216
parent01188f996d2e65c9f1d0849cf834acebb32065ea
[ELF] Support -plugin-opt=stats-file=

This flag is added by clang::driver::tools::addLTOOptions() and was causing
errors for me when building the llvm-test-suite repository with LTO and
-DTEST_SUITE_COLLECT_STATS=ON. This replaces the --stats-file= option
added in 1c04b52b2594d403f739ed919ef420b1e47ae343 since the flag is only
used for LTO and should therefore be in the -plugin-opt= namespace.

Additionally, this commit fixes the `REQUIRES: asserts` that was added in
948d05324a150a5a24e93bad07c9090d5b8bd129: the feature was never defined in
the lld test suite so it effectively disabled the test.

Reviewed By: MaskRay, MTC

Differential Revision: https://reviews.llvm.org/D124105
lld/ELF/Driver.cpp
lld/ELF/Options.td
lld/test/ELF/lto/stats-file-option.ll
lld/test/lit.cfg.py