Skip to content

Commit 6a54b42

Browse files
committed
TSCLibc: convert library to static
This library is mostly unused on other targets outside of the re-export of the C library. Convert the library to static as it is unused outside of TSCBasic. This simplifies the redistribution.
1 parent dd1717f commit 6a54b42

File tree

2 files changed

+4
-15
lines changed

2 files changed

+4
-15
lines changed

Sources/TSCBasic/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ target_compile_options(TSCBasic PUBLIC
5757
# Ignore secure function warnings on Windows.
5858
"$<$<PLATFORM_ID:Windows>:SHELL:-Xcc -D_CRT_SECURE_NO_WARNINGS>")
5959
target_link_libraries(TSCBasic PUBLIC
60-
SwiftSystem::SystemPackage
61-
TSCLibc)
60+
SwiftSystem::SystemPackage)
6261
target_link_libraries(TSCBasic PRIVATE
63-
TSCclibc)
62+
TSCclibc
63+
TSCLibc)
6464
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
6565
if(Foundation_FOUND)
6666
target_link_libraries(TSCBasic PUBLIC

Sources/TSCLibc/CMakeLists.txt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,9 @@
66
# See http://swift.org/LICENSE.txt for license information
77
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
88

9-
add_library(TSCLibc
9+
add_library(TSCLibc STATIC
1010
libc.swift)
1111

12-
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
13-
target_compile_options(TSCLibc PRIVATE
14-
-autolink-force-load)
15-
endif()
1612
# NOTE(compnerd) workaround for CMake not setting up include flags yet
1713
set_target_properties(TSCLibc PROPERTIES
1814
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_Swift_MODULE_DIRECTORY})
19-
20-
install(TARGETS TSCLibc
21-
ARCHIVE DESTINATION lib
22-
LIBRARY DESTINATION lib
23-
RUNTIME DESTINATION bin)
24-
25-
set_property(GLOBAL APPEND PROPERTY TSC_EXPORTS TSCLibc)

0 commit comments

Comments
 (0)