mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 17:16:05 +00:00

Add an option to specify additional linker flags for unit tests only. For example, this allows using something like -DLLVM_UNITTEST_LINK_FLAGS="-Wl,-plugin-opt=O0" if you're doing LTO builds, or -DLLVM_UNITTEST_LINK_FLAGS="-fno-lto" if you're using fat LTO objects. The build system already does this itself if the LLVM_ENABLE_LTO flag is used, but this does not cover all possible LTO configurations. Differential Revision: https://reviews.llvm.org/D154212
See docs/CMake.html for instructions on how to build LLVM with CMake.