Skip to content

Commit e46da50

Browse files
authored
Merge pull request #80207 from compnerd/_Builtin_float
Runtimes: add `_Builtin_float` to the overlay
2 parents 1950aa4 + 372923d commit e46da50

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

Runtimes/Overlay/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ add_compile_options(
4747
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-concurrency-module-import>"
4848
"$<$<COMPILE_LANGUAGE:Swift>:SHELL:-Xfrontend -disable-implicit-string-processing-module-import>")
4949

50+
add_subdirectory(clang)
5051
if(WIN32)
5152
add_subdirectory(Windows)
5253
endif()

Runtimes/Overlay/clang/CMakeLists.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
gyb_expand(float.swift.gyb float.swift)
3+
4+
add_library(swift_Builtin_float
5+
float.swift
6+
"${PROJECT_SOURCE_DIR}/linker-support/magic-symbols-for-install-name.c")
7+
set_target_properties(swift_Builtin_float PROPERTIES
8+
Swift_MODULE_NAME _Builtin_float)
9+
target_compile_options(swift_Builtin_float PRIVATE
10+
"$<$<PLATFORM_ID:Darwin>:SHELL:-Xfrontend -module-abi-name -Xfrontend Darwin>")
11+
12+
install(TARGETS swift_Builtin_float
13+
ARCHIVE DESTINATION "${SwiftOverlay_INSTALL_LIBDIR}"
14+
LIBRARY DESTINATION "${SwiftOverlay_INSTALL_LIBDIR}"
15+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
16+
emit_swift_interface(swift_Builtin_float)
17+
install_swift_interface(swift_Builtin_float)
18+
19+
embed_manifest(swift_Builtin_float)

Runtimes/Resync.cmake

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ copy_files("" "Core" FILES "Info.plist.in")
9898

9999
# Platform Overlays
100100

101+
# Copy magic linker symbols
102+
copy_library_sources("linker-support" "" "Overlay")
103+
104+
message(STATUS "Clang[${StdlibSources}/public/ClangOverlays] -> ${CMAKE_CURRENT_LIST_DIR}/Overlay/clang")
105+
copy_files(public/ClangOverlays Overlay/clang FILES float.swift.gyb)
106+
101107
# Windows Overlay
102108
message(STATUS "WinSDK[${StdlibSources}/public/Windows] -> ${CMAKE_CURRENT_LIST_DIR}/Overlay/Windows/WinSDK")
103109
copy_files(public/Windows Overlay/Windows/WinSDK FILES WinSDK.swift)

0 commit comments

Comments
 (0)