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)
99 cmake_parse_arguments (AST "${options} " "${single_value_options} " "${multiple_value_options} " ${ARGN} )
1010
1111 set (compile_flags ${CMAKE_SWIFT_FLAGS} )
12- set (link_flags )
12+ set (link_flags ${CMAKE_SWIFT_LINK_FLAGS} )
1313
1414 if (AST_TARGET)
1515 list (APPEND compile_flags -target ;${AST_TARGET} )
Original file line number Diff line number Diff line change @@ -116,9 +116,17 @@ if(ENABLE_SWIFT)
116116 POSITION_INDEPENDENT_CODE YES )
117117
118118 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 ()
120124 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 ()
122130 endif ()
123131
124132 add_swift_library(swiftDispatch
You can’t perform that action at this time.
0 commit comments