Skip to content

Commit ee500da

Browse files
compnerdrokhinip
authored andcommitted
build: spell the linker suffix properly on Windows
Windows requires that the .exe suffix be present to use the tools from the Android NDK. Signed-off-by: Kim Topley <[email protected]>
1 parent 70374db commit ee500da

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/CMakeLists.txt

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,17 @@ if(ENABLE_SWIFT)
115115
POSITION_INDEPENDENT_CODE YES)
116116

117117
if(USE_LLD_LINKER)
118-
set(use_ld_flag -use-ld=lld)
118+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
119+
set(use_ld_flag -use-ld=lld.exe)
120+
else()
121+
set(use_ld_flag -use-ld=lld)
122+
endif()
119123
elseif(USE_GOLD_LINKER)
120-
set(use_ld_flag -use-ld=gold)
124+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
125+
set(use_ld_flag -use-ld=gold.exe)
126+
else()
127+
set(use_ld_flag -use-ld=gold)
128+
endif()
121129
endif()
122130

123131
add_swift_library(swiftDispatch
File renamed without changes.

0 commit comments

Comments
 (0)