File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ function(add_swift_target target)
9
9
cmake_parse_arguments (AST "${options} " "${single_value_options} " "${multiple_value_options} " ${ARGN} )
10
10
11
11
set (compile_flags ${CMAKE_SWIFT_FLAGS} )
12
- set (link_flags )
12
+ set (link_flags ${CMAKE_SWIFT_LINK_FLAGS} )
13
13
14
14
if (AST_TARGET )
15
15
list (APPEND compile_flags -target;${AST_TARGET} )
Original file line number Diff line number Diff line change @@ -116,9 +116,17 @@ if(ENABLE_SWIFT)
116
116
POSITION_INDEPENDENT_CODE YES )
117
117
118
118
if (USE_LLD_LINKER )
119
- set (use_ld_flag -use-ld=lld )
119
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows )
120
+ set (use_ld_flag -use-ld=lld.exe )
121
+ else ()
122
+ set (use_ld_flag -use-ld=lld )
123
+ endif ()
120
124
elseif (USE_GOLD_LINKER )
121
- set (use_ld_flag -use-ld=gold )
125
+ if (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows )
126
+ set (use_ld_flag -use-ld=gold.exe )
127
+ else ()
128
+ set (use_ld_flag -use-ld=gold )
129
+ endif ()
122
130
endif ()
123
131
124
132
add_swift_library (swiftDispatch
You can’t perform that action at this time.
0 commit comments