Skip to content

Windows Android cross-compilation build support #500

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/modules/SwiftSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function(add_swift_target target)
cmake_parse_arguments(AST "${options}" "${single_value_options}" "${multiple_value_options}" ${ARGN})

set(compile_flags ${CMAKE_SWIFT_FLAGS})
set(link_flags)
set(link_flags ${CMAKE_SWIFT_LINK_FLAGS})

if(AST_TARGET)
list(APPEND compile_flags -target;${AST_TARGET})
Expand Down
12 changes: 10 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,17 @@ if(ENABLE_SWIFT)
POSITION_INDEPENDENT_CODE YES)

if(USE_LLD_LINKER)
set(use_ld_flag -use-ld=lld)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
set(use_ld_flag -use-ld=lld.exe)
else()
set(use_ld_flag -use-ld=lld)
endif()
elseif(USE_GOLD_LINKER)
set(use_ld_flag -use-ld=gold)
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
set(use_ld_flag -use-ld=gold.exe)
else()
set(use_ld_flag -use-ld=gold)
endif()
endif()

add_swift_library(swiftDispatch
Expand Down