[PATCH] D55056: [CMake] Default options for faster executables on MSVC
Zachary Turner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 30 11:19:34 PST 2018
zturner added inline comments.
================
Comment at: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake:387
+ foreach(FLAG EXE MODULE SHARED STATIC)
+ string(REGEX REPLACE "[-/](INCREMENTAL:YES|INCREMENTAL:NO|INCREMENTAL)" "/INCREMENTAL:NO" CMAKE_${FLAG}_LINKER_FLAGS_${CONFIG} "${CMAKE_${FLAG}_LINKER_FLAGS_${CONFIG}}")
+ endforeach()
----------------
rnk wrote:
> Looks like it needs one more indentation level to be in the loop over target types. We don't have a formatter tool for cmake, but it would be easier to read if this was broken up onto multiple lines.
Instead of replacing all the options in an existing command line, why don't we just have something like:
```
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC" AND NOT LLVM_ENABLE_INCREMENTAL_LINK AND CMAKE_BUILD_TYPE != "Debug")
append("/INCREMENTAL:NO" CMAKE_LINKER_FLAGS)
endif()
```
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D55056/new/
https://reviews.llvm.org/D55056
More information about the llvm-commits
mailing list