Skip to content

Commit 70cb943

Browse files
committed
[Build] Add some libraries to the autolink list.
For static linking, we need to list all the dependencies of libcurl or libxml2 that we're using. This differs from dynamic linking, because in the latter case that information is in the shared objects, which is not true in the statically linked case. rdar://123381867
1 parent db0c7fc commit 70cb943

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/FoundationNetworking/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,10 @@ target_link_libraries(FoundationNetworking
7070
if(NOT BUILD_SHARED_LIBS)
7171
target_compile_options(FoundationNetworking
7272
PRIVATE
73-
"SHELL:-Xfrontend -public-autolink-library -Xfrontend curl")
73+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend curl"
74+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend crypto"
75+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend ssl"
76+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend z")
7477

7578
# Merge private dependencies into single static objects archive
7679
set_property(TARGET FoundationNetworking PROPERTY STATIC_LIBRARY_OPTIONS

Sources/FoundationXML/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ target_link_libraries(FoundationXML
2121
if(NOT BUILD_SHARED_LIBS)
2222
target_compile_options(FoundationXML
2323
PRIVATE
24-
"SHELL:-Xfrontend -public-autolink-library -Xfrontend xml2")
24+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend xml2"
25+
"SHELL:-Xfrontend -public-autolink-library -Xfrontend z")
2526

2627
# Merge private dependencies into single static objects archive
2728
set_property(TARGET FoundationXML PROPERTY STATIC_LIBRARY_OPTIONS

0 commit comments

Comments
 (0)