Skip to content

Commit d48686f

Browse files
committed
build: effectively revert 986beb7
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.
1 parent f2783bb commit d48686f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,7 @@ macro(swift_common_standalone_build_config_llvm product is_cross_compiling)
8181
# HACK: this ugly tweaking is to prevent the propagation of the flag from LLVM
8282
# into swift. The use of this flag pollutes all targets, and we are not able
8383
# to remove it on a per-target basis which breaks cross-compilation.
84-
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
85-
string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
86-
endif()
84+
string(REGEX REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
8785

8886
set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
8987
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" PACKAGE_VERSION_MAJOR

0 commit comments

Comments
 (0)