[PATCH] D80493: [CMake]: Properly handle the LTO cache arguments for MinGW

Tobias Hieta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 24 12:48:13 PDT 2020


thieta marked an inline comment as done.
thieta added inline comments.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:959
            CMAKE_EXE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS)
-  elseif(UNIX AND LLVM_USE_LINKER STREQUAL "lld")
+  elseif(UNIX OR MINGW AND LLVM_USE_LINKER STREQUAL "lld")
     append("-Wl,--thinlto-cache-dir=${PROJECT_BINARY_DIR}/lto.cache"
----------------
mati865 wrote:
> mstorsjo wrote:
> > I'd feel more comfortable with parentheses here
> AND takes precedence over OR so this code is in fact:
> ```
> elseif(UNIX OR (MINGW AND LLVM_USE_LINKER STREQUAL "lld"))
> ```
> So parentheses around `UNIX OR MINGW` are necessary.
I will fix this!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80493





More information about the llvm-commits mailing list