[PATCH] D80493: [CMake]: Properly handle the LTO cache arguments for MinGW
Mateusz MikuĊa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 24 12:16:31 PDT 2020
mati865 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"
----------------
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.
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