Skip to content

Commit b13a51e

Browse files
authored
Merge pull request #370 from compnerd/lld
build: ensure that USE_LLD_LINKER negates USE_GOLD_LINKER
2 parents 82342ee + ae3d119 commit b13a51e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,15 +91,15 @@ option(BUILD_SHARED_LIBS "build shared libraries" ON)
9191

9292
option(ENABLE_TESTING "build libdispatch tests" ON)
9393

94-
option(USE_LLD_LINKER "use the lld linker" OFF)
94+
option(USE_LLD_LINKER "use the lld linker" FALSE)
9595

96-
if(CMAKE_SYSTEM_NAME STREQUAL Linux OR
97-
CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR
98-
CMAKE_SYSTEM_NAME STREQUAL Android AND
99-
NOT USE_LLD_LINKER)
100-
set(USE_GOLD_LINKER_DEFAULT ON)
96+
if(NOT USE_LLD_LINKER AND
97+
(CMAKE_SYSTEM_NAME STREQUAL Linux OR
98+
CMAKE_SYSTEM_NAME STREQUAL FreeBSD OR
99+
CMAKE_SYSTEM_NAME STREQUAL Android))
100+
set(USE_GOLD_LINKER_DEFAULT TRUE)
101101
else()
102-
set(USE_GOLD_LINKER_DEFAULT OFF)
102+
set(USE_GOLD_LINKER_DEFAULT FALSE)
103103
endif()
104104
option(USE_GOLD_LINKER "use the gold linker" ${USE_GOLD_LINKER_DEFAULT})
105105

0 commit comments

Comments
 (0)