Skip to content

Commit 718159e

Browse files
Add public dependent libraries using -public-autolink-library
1 parent f409d1f commit 718159e

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

Sources/Foundation/CMakeLists.txt

+4-5
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ set_target_properties(Foundation PROPERTIES
161161
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_BINARY_DIR}/swift)
162162

163163
if(NOT BUILD_SHARED_LIBS)
164-
# TODO(katei): Comment out after swift-frontend implementation
165-
# https://github.com/apple/swift/pull/35936
166-
# target_compile_options(Foundation
167-
# PRIVATE
168-
# "SHELL:-public-autolink-library icui18n")
164+
target_compile_options(Foundation
165+
PRIVATE
166+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend icui18n
167+
-Xfrontend -public-autolink-library -Xfrontend BlocksRuntime")
169168

170169
# Merge private dependencies into single static objects archive
171170
set_property(TARGET Foundation PROPERTY STATIC_LIBRARY_OPTIONS

Sources/FoundationNetworking/CMakeLists.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,9 @@ target_link_libraries(FoundationNetworking
6666
Foundation)
6767

6868
if(NOT BUILD_SHARED_LIBS)
69-
# TODO(katei): Comment out after swift-frontend implementation
70-
# https://github.com/apple/swift/pull/35936
71-
# target_compile_options(FoundationNetworking
72-
# PRIVATE
73-
# "SHELL:-public-autolink-library curl")
69+
target_compile_options(FoundationNetworking
70+
PRIVATE
71+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend curl")
7472

7573
# Merge private dependencies into single static objects archive
7674
set_property(TARGET FoundationNetworking PROPERTY STATIC_LIBRARY_OPTIONS

Sources/FoundationXML/CMakeLists.txt

+3-5
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ target_link_libraries(FoundationXML
1818
Foundation)
1919

2020
if(NOT BUILD_SHARED_LIBS)
21-
# TODO(katei): Comment out after swift-frontend implementation
22-
# https://github.com/apple/swift/pull/35936
23-
# target_compile_options(FoundationXML
24-
# PRIVATE
25-
# "SHELL:-public-autolink-library xml2")
21+
target_compile_options(FoundationXML
22+
PRIVATE
23+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend xml2")
2624

2725
# Merge private dependencies into single static objects archive
2826
set_property(TARGET FoundationXML PROPERTY STATIC_LIBRARY_OPTIONS

0 commit comments

Comments
 (0)