[all-commits] [llvm/llvm-project] c0011f: [cmake] Add LLVM_UNITTEST_LINK_FLAGS option

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Jul 5 00:19:51 PDT 2023

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c0011f027d68aa255359892abc5b110af9ebcccf
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-07-05 (Wed, 05 Jul 2023)

  Changed paths:
    M llvm/cmake/modules/AddLLVM.cmake
    M llvm/cmake/modules/HandleLLVMOptions.cmake

  Log Message:
  [cmake] Add LLVM_UNITTEST_LINK_FLAGS option

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

More information about the All-commits mailing list