Skip to content

Commit 5835d8e

Browse files
committed
cmake: Use "set" instead of "option" for LLVM_ENABLE_LTO
Apparently option is for bools and cmake-gui will display this strangely with option. Pointed out by edward-san - thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@260154 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent cdcce2d commit 5835d8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -656,7 +656,7 @@ append_if(LLVM_BUILD_INSTRUMENTED "-fprofile-instr-generate"
656656
CMAKE_EXE_LINKER_FLAGS
657657
CMAKE_SHARED_LINKER_FLAGS)
658658

659-
option(LLVM_ENABLE_LTO "Build LLVM with LTO. May be specified as Thin or Full to use a particular kind of LTO" OFF)
659+
set(LLVM_ENABLE_LTO OFF CACHE STRING "Build LLVM with LTO. May be specified as Thin or Full to use a particular kind of LTO")
660660
string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
661661
if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
662662
append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS

0 commit comments

Comments
 (0)