Skip to content

Commit bfb7596

Browse files
committed
Add SwiftShims as an interface library
1 parent 46dfee2 commit bfb7596

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

Runtimes/Core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ include(CompilerSettings)
1212
include_directories(include)
1313

1414
add_subdirectory(LLVMSupport)
15+
add_subdirectory(SwiftShims/swift/shims)
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Swift shim header files
2+
install(FILES
3+
AssertionReporting.h
4+
CoreFoundationShims.h
5+
EmbeddedShims.h
6+
FoundationShims.h
7+
GlobalObjects.h
8+
HeapObject.h
9+
KeyPath.h
10+
LibcOverlayShims.h
11+
LibcShims.h
12+
MetadataSections.h
13+
Random.h
14+
RefCount.h
15+
Reflection.h
16+
RuntimeShims.h
17+
RuntimeStubs.h
18+
SwiftStdbool.h
19+
SwiftStddef.h
20+
SwiftStdint.h
21+
System.h
22+
Target.h
23+
ThreadLocalStorage.h
24+
UnicodeData.h
25+
Visibility.h
26+
_SwiftConcurrency.h
27+
_SwiftDistributed.h
28+
_SynchronizationShims.h
29+
module.modulemap
30+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/swift/shims")
31+
32+
add_library(swiftShims INTERFACE)
33+
target_include_directories(swiftShims INTERFACE
34+
$<$<COMPILE_LANGUAGE:C,CXX>:${CMAKE_CURRENT_SOURCE_DIR}/../../>
35+
$<$<COMPILE_LANGUAGE:Swift>:${CMAKE_CURRENT_SOURCE_DIR}>)
36+
target_compile_options(swiftShims INTERFACE
37+
$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xcc$<SEMICOLON>-fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/module.modulemap>)

Runtimes/Resync.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ endfunction()
5252
copy_library_sources(include "" "Core")
5353

5454
set(CoreLibs
55-
LLVMSupport)
55+
LLVMSupport
56+
SwiftShims)
5657

5758
# Add these as we get them building
5859
# core

0 commit comments

Comments
 (0)