From d48686ff0d8830b38957ad591544d325c6e4476a Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Fri, 1 Dec 2017 13:32:30 -0800 Subject: [PATCH] build: effectively revert 986beb75225a09969f71123f134967eecef0dcd5 This change broke the Windows builds for all the variants. `-z defs` cannot be used on all targets, particularly in environments where the stdlib is being compiled for a foreign host. This needs to be handled more carefully as I mentioned on the PR itself. In the mean time, revert it to get Windows building again. --- cmake/modules/SwiftSharedCMakeConfig.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmake/modules/SwiftSharedCMakeConfig.cmake b/cmake/modules/SwiftSharedCMakeConfig.cmake index 5c2db0f3cf9cd..a832224ece6e8 100644 --- a/cmake/modules/SwiftSharedCMakeConfig.cmake +++ b/cmake/modules/SwiftSharedCMakeConfig.cmake @@ -81,9 +81,7 @@ macro(swift_common_standalone_build_config_llvm product is_cross_compiling) # HACK: this ugly tweaking is to prevent the propagation of the flag from LLVM # into swift. The use of this flag pollutes all targets, and we are not able # to remove it on a per-target basis which breaks cross-compilation. - if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows") - string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") - endif() + string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}") set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}") string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" PACKAGE_VERSION_MAJOR