Skip to content

Commit 6716376

Browse files
authored
Merge pull request #1945 from compnerd/accept-defeat
2 parents e2dd087 + a172613 commit 6716376

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,21 +108,29 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
108108
elseif(CMAKE_SYSTEM_NAME STREQUAL Windows)
109109
set(deployment_target -DDEPLOYMENT_TARGET_WINDOWS)
110110
# FIXME(compnerd) these are not all CoreFoundation dependencies, some of them
111-
# are Foundation's. We should split them up accordingly.
111+
# are Foundation's and others are libcurl's. We should split them up
112+
# accordingly.
112113
set(CoreFoundation_INTERFACE_LIBRARIES
113114
-lAdvAPI32
115+
-lCrypt32
114116
-lDbgHelp
115117
-lShell32
116118
-lOle32
117119
-lRpcRT4
118120
-lSecur32
119121
-lShLwApi
120122
-lUser32
123+
-lWldap32
121124
-lWS2_32
122125
-liphlpapi
126+
-lmincore
127+
-lnormaliz
123128
-lpathcch
124129
-lucrt
125130
-lshell32)
131+
# FIXME(SR9138) Silence "locally defined symbol '…' imported in function '…'
132+
set(WORKAROUND_SR9138 -Xlinker;-ignore:4217)
133+
set(WORKAROUND_SR9995 -Xlinker;-nodefaultlib:libcmt)
126134
endif()
127135

128136
add_swift_library(Foundation
@@ -313,6 +321,8 @@ add_swift_library(Foundation
313321
-luuid
314322
${Foundation_RPATH}
315323
${CoreFoundation_INTERFACE_LIBRARIES}
324+
${WORKAROUND_SR9138}
325+
${WORKAROUND_SR9995}
316326
SWIFT_FLAGS
317327
-DDEPLOYMENT_RUNTIME_SWIFT
318328
${deployment_enable_libdispatch}
@@ -347,7 +357,8 @@ add_swift_executable(plutil
347357
-L${CMAKE_CURRENT_BINARY_DIR}
348358
-lFoundation
349359
${Foundation_INTERFACE_LIBRARIES}
350-
-Xlinker;-rpath;-Xlinker;"\\\$\$ORIGIN/../lib/swift/${swift_os}"
360+
${Foundation_RPATH}
361+
${WORKAROUND_SR9995}
351362
SWIFT_FLAGS
352363
-DDEPLOYMENT_RUNTIME_SWIFT
353364
${deployment_enable_libdispatch}

CoreFoundation/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,9 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL Windows)
339339
PRIVATE
340340
-D_WINDLL)
341341
endif()
342+
target_compile_definitions(CoreFoundation
343+
PRIVATE
344+
-DCURL_STATICLIB)
342345
endif()
343346
target_compile_definitions(CoreFoundation
344347
PRIVATE

0 commit comments

Comments
 (0)