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