Skip to content

Commit 3f1c097

Browse files
authored
Merge pull request #2683 from compnerd/force-linking
build: use forced loading for FoundationNetworking
2 parents f80087a + 0552fe7 commit 3f1c097

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Sources/FoundationNetworking/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ target_compile_definitions(FoundationNetworking PRIVATE
3232
DEPLOYMENT_RUNTIME_SWIFT
3333
NS_BUILDING_FOUNDATION_NETWORKING)
3434
target_compile_options(FoundationNetworking PUBLIC
35+
-autolink-force-load
36+
# SR-12254: workaround for the swift compiler not properly tracking the
37+
# forced load symbol when validating the TBD
38+
-Xfrontend -validate-tbd-against-ir=none
3539
$<$<BOOL:${ENABLE_TESTING}>:-enable-testing>
3640
"SHELL:-Xcc -F${CMAKE_BINARY_DIR}")
3741
target_link_libraries(FoundationNetworking

0 commit comments

Comments
 (0)