Skip to content

Commit d70f08f

Browse files
authored
---
yaml --- r: 340711 b: refs/heads/rxwei-patch-1 c: 194dba6 h: refs/heads/master i: 340709: ce096c7 340707: d983411 340703: 9a682d7
1 parent 36d4134 commit d70f08f

File tree

211 files changed

+10328
-4414
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+10328
-4414
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1015,7 +1015,7 @@ refs/tags/swift-DEVELOPMENT-SNAPSHOT-2018-08-18-a: b10b1fce14385faa6d44f6b933e95
10151015
refs/heads/rdar-43033749-fix-batch-mode-no-diags-swift-5.0-branch: a14e64eaad30de89f0f5f0b2a782eed7ecdcb255
10161016
refs/heads/revert-19006-error-bridging-integer-type: 8a9065a3696535305ea53fe9b71f91cbe6702019
10171017
refs/heads/revert-19050-revert-19006-error-bridging-integer-type: ecf752d54b05dd0a20f510f0bfa54a3fec3bcaca
1018-
refs/heads/rxwei-patch-1: 8ae76342f8fbc5f5d8a0d6c14b4e722ddcf9eb83
1018+
refs/heads/rxwei-patch-1: 194dba6c6924cf497340f710b91d48b5617f645b
10191019
refs/heads/shahmishal-patch-1: e58ec0f7488258d42bef51bc3e6d7b3dc74d7b2a
10201020
refs/heads/typelist-existential: 4046359efd541fb5c72d69a92eefc0a784df8f5e
10211021
refs/tags/swift-4.2-DEVELOPMENT-SNAPSHOT-2018-08-20-a: 4319ba09e4fb8650ee86061075c74a016b6baab9

branches/rxwei-patch-1/CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -845,14 +845,18 @@ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT CMAKE_CROSSCOMPILING)
845845
set(CMAKE_OSX_DEPLOYMENT_TARGET "")
846846
endif()
847847

848-
message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
849-
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
850-
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
851-
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
852-
message(STATUS "")
853-
854-
if (SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
848+
if(SWIFT_INCLUDE_TOOLS)
849+
message(STATUS "Building host Swift tools for ${SWIFT_HOST_VARIANT_SDK} ${SWIFT_HOST_VARIANT_ARCH}")
850+
message(STATUS " Build type: ${CMAKE_BUILD_TYPE}")
851+
message(STATUS " Assertions: ${LLVM_ENABLE_ASSERTIONS}")
852+
message(STATUS " LTO: ${SWIFT_TOOLS_ENABLE_LTO}")
853+
message(STATUS "")
854+
else()
855+
message(STATUS "Not building host Swift tools")
856+
message(STATUS "")
857+
endif()
855858

859+
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
856860
message(STATUS "Building Swift standard library and overlays for SDKs: ${SWIFT_SDKS}")
857861
message(STATUS " Build type: ${SWIFT_STDLIB_BUILD_TYPE}")
858862
message(STATUS " Assertions: ${SWIFT_STDLIB_ASSERTIONS}")
@@ -861,12 +865,9 @@ if (SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
861865
message(STATUS "Building Swift runtime with:")
862866
message(STATUS " Leak Detection Checker Entrypoints: ${SWIFT_RUNTIME_ENABLE_LEAK_CHECKER}")
863867
message(STATUS "")
864-
865868
else()
866-
867869
message(STATUS "Not building Swift standard library, SDK overlays, and runtime")
868870
message(STATUS "")
869-
870871
endif()
871872

872873
#

branches/rxwei-patch-1/cmake/modules/AddSwift.cmake

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -462,10 +462,10 @@ function(_add_variant_link_flags)
462462
list(APPEND link_libraries "bsd" "atomic")
463463
list(APPEND result "-Wl,-Bsymbolic")
464464
elseif("${LFLAGS_SDK}" STREQUAL "ANDROID")
465-
list(APPEND link_libraries "dl" "log" "atomic" "icudataswift" "icui18nswift" "icuucswift")
466-
# We provide our own C++ below, so we ask the linker not to do it. However,
467-
# we need to add the math library, which is linked implicitly by libc++.
468-
list(APPEND result "-nostdlib++" "-lm")
465+
list(APPEND link_libraries "dl" "log" "atomic")
466+
# We need to add the math library, which is linked implicitly by libc++
467+
list(APPEND result "-lm")
468+
469469
if("${LFLAGS_ARCH}" MATCHES armv7)
470470
set(android_libcxx_path "${SWIFT_ANDROID_NDK_PATH}/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a")
471471
elseif("${LFLAGS_ARCH}" MATCHES aarch64)
@@ -477,8 +477,17 @@ function(_add_variant_link_flags)
477477
else()
478478
message(SEND_ERROR "unknown architecture (${LFLAGS_ARCH}) for android")
479479
endif()
480-
list(APPEND link_libraries "${android_libcxx_path}/libc++abi.a")
481-
list(APPEND link_libraries "${android_libcxx_path}/libc++_shared.so")
480+
481+
# link against the custom C++ library
482+
list(APPEND link_libraries
483+
${android_libcxx_path}/libc++abi.a
484+
${android_libcxx_path}/libc++_shared.so)
485+
486+
# link against the ICU libraries
487+
list(APPEND link_libraries
488+
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_I18N}
489+
${SWIFT_ANDROID_${LFLAGS_ARCH}_ICU_UC})
490+
482491
swift_android_lib_for_arch(${LFLAGS_ARCH} ${LFLAGS_ARCH}_LIB)
483492
foreach(path IN LISTS ${LFLAGS_ARCH}_LIB)
484493
list(APPEND library_search_directories ${path})
@@ -517,8 +526,12 @@ function(_add_variant_link_flags)
517526
NOT "${CMAKE_SYSTEM_NAME}" STREQUAL "WINDOWS"))
518527
list(APPEND result "-fuse-ld=lld")
519528
elseif(SWIFT_ENABLE_GOLD_LINKER AND
520-
"${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
521-
list(APPEND result "-fuse-ld=gold")
529+
"${SWIFT_SDK_${LFLAGS_SDK}_OBJECT_FORMAT}" STREQUAL "ELF")
530+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
531+
list(APPEND result "-fuse-ld=gold.exe")
532+
else()
533+
list(APPEND result "-fuse-ld=gold")
534+
endif()
522535
endif()
523536
endif()
524537

@@ -1367,8 +1380,16 @@ function(_add_swift_library_single target name)
13671380
${SWIFTLIB_SINGLE_PRIVATE_LINK_LIBRARIES})
13681381
endif()
13691382

1370-
set_property(TARGET "${target}" PROPERTY
1383+
# NOTE(compnerd) use the C linker language to invoke `clang` rather than
1384+
# `clang++` as we explicitly link against the C++ runtime. We were previously
1385+
# actually passing `-nostdlib++` to avoid the C++ runtime linkage.
1386+
if(SWIFTLIB_SINGLE_SDK STREQUAL ANDROID)
1387+
set_property(TARGET "${target}" PROPERTY
1388+
LINKER_LANGUAGE "C")
1389+
else()
1390+
set_property(TARGET "${target}" PROPERTY
13711391
LINKER_LANGUAGE "CXX")
1392+
endif()
13721393

13731394
if(target_static)
13741395
set_property(TARGET "${target_static}" APPEND_STRING PROPERTY

branches/rxwei-patch-1/cmake/modules/SwiftConfigureSDK.cmake

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function(_report_sdk prefix)
2828
message(STATUS " ${arch} LIB: ${${arch}_LIB}")
2929
endforeach()
3030
elseif("${prefix}" STREQUAL "ANDROID")
31-
message(STATUS " NDK Dir: $ENV{SWIFT_ANDROID_NDK_PATH}")
31+
message(STATUS " NDK: $ENV{SWIFT_ANDROID_NDK_PATH}")
3232
foreach(arch ${SWIFT_SDK_${prefix}_ARCHITECTURES})
3333
swift_android_include_for_arch(${arch} ${arch}_INCLUDE)
3434
swift_android_lib_for_arch(${arch} ${arch}_LIB)
@@ -225,10 +225,14 @@ macro(configure_sdk_unix name architectures)
225225
endif()
226226

227227
# Get the prebuilt suffix to create the correct toolchain path when using the NDK
228-
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
229-
set(_swift_android_prebuilt_build "darwin-x86_64")
230-
elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
231-
set(_swift_android_prebuilt_build "linux-x86_64")
228+
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
229+
set(_swift_android_prebuilt_build darwin-x86_64)
230+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Linux)
231+
set(_swift_android_prebuilt_build linux-x86_64)
232+
elseif(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
233+
set(_swift_android_prebuilt_build Windows-x86_64)
234+
else()
235+
message(SEND_ERROR "cannot cross-compile to android from ${CMAKE_HOST_SYSTEM_NAME}")
232236
endif()
233237
if("${arch}" STREQUAL "i686")
234238
set(SWIFT_SDK_ANDROID_ARCH_${arch}_NDK_PREBUILT_PATH

branches/rxwei-patch-1/docs/WindowsBuild.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ cmake -G Ninja^
355355
-DFOUNDATION_BUILD_DIR=S:\b\foundation^
356356
-DLIBDISPATCH_BUILD_DIR=S:\b\libdispatch^
357357
-DLIBDISPATCH_SOURCE_DIR=S:\swift-corelibs-libdispatch^
358-
-DLLBUILD_PATH_TO_SQLITE_SOURCE=S:\sqlite-amalgamation-3270200^
359-
-DLLBUILD_PATH_TO_SQLITE_BUILD=S:\b\sqlite^
358+
-DSQLite3_INCLUDE_DIR=S:\sqlite-amalgamation-3270200^
359+
-DSQLite3_LIBRARY=S:\b\sqlite\sqlite3.lib^
360360
-DLLBUILD_SUPPORT_BINDINGS=Swift^
361361
S:\llbuild
362362
ninja

0 commit comments

Comments
 (0)