Skip to content
This repository was archived by the owner on Mar 28, 2020. It is now read-only.

Commit a4b7bbb

Browse files
bognergottesmm
authored andcommitted
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 (cherry picked from commit 5835d8e)
1 parent 128319f commit a4b7bbb

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
@@ -635,7 +635,7 @@ append_if(LLVM_BUILD_INSTRUMENTED "-fprofile-instr-generate"
635635
CMAKE_EXE_LINKER_FLAGS
636636
CMAKE_SHARED_LINKER_FLAGS)
637637

638-
option(LLVM_ENABLE_LTO "Build LLVM with LTO. May be specified as Thin or Full to use a particular kind of LTO" OFF)
638+
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")
639639
string(TOUPPER "${LLVM_ENABLE_LTO}" uppercase_LLVM_ENABLE_LTO)
640640
if(uppercase_LLVM_ENABLE_LTO STREQUAL "THIN")
641641
append("-flto=thin" CMAKE_CXX_FLAGS CMAKE_C_FLAGS

0 commit comments

Comments
 (0)