Skip to content

Commit b315a79

Browse files
committed
CMake: add explicit dependency to _Builtin_float to targets...
... that would import that as a result of importing Darwin from the SDK. Amend my previous change to Differentiation and Distributed in this sense. Addresses rdar://150400049
1 parent 23a1817 commit b315a79

File tree

9 files changed

+82
-8
lines changed

9 files changed

+82
-8
lines changed

stdlib/private/OSLog/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ endif()
88
if (SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
99
list(APPEND swift_oslog_darwin_dependencies "_StringProcessing")
1010
endif()
11+
if((SWIFT_BUILD_CLANG_OVERLAYS
12+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
13+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
14+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
15+
# We need to make this dependency explicit because this library
16+
# imports Darwin and Darwin re-exports _Builtin_float,
17+
# but in most configurations we pull Darwin from the SDK,
18+
# meaning we specify no Darwin dependency in the build system
19+
list(APPEND swift_oslog_darwin_dependencies _Builtin_float)
20+
endif()
1121

1222
add_swift_target_library(swiftOSLogTestHelper
1323
IS_SDK_OVERLAY

stdlib/private/StdlibUnittest/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ else()
44
set(swift_stdlib_unittest_darwin_dependencies)
55
endif()
66

7+
if((SWIFT_BUILD_CLANG_OVERLAYS
8+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
9+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
10+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
11+
# We need to make this dependency explicit because this library
12+
# imports Darwin and Darwin re-exports _Builtin_float,
13+
# but in most configurations we pull Darwin from the SDK,
14+
# meaning we specify no Darwin dependency in the build system
15+
list(APPEND swift_stdlib_unittest_darwin_dependencies _Builtin_float)
16+
endif()
17+
718
set(swift_stdlib_unittest_compile_flags
819
"-Xfrontend" "-disable-objc-attr-requires-foundation-module")
920
if (SWIFT_RUNTIME_ENABLE_LEAK_CHECKER)

stdlib/private/SwiftPrivate/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ else()
88
set(swift_swiftprivate_darwin_dependencies)
99
endif()
1010

11+
if((SWIFT_BUILD_CLANG_OVERLAYS
12+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
13+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
14+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
15+
# We need to make this dependency explicit because this library
16+
# imports Darwin and Darwin re-exports _Builtin_float,
17+
# but in most configurations we pull Darwin from the SDK,
18+
# meaning we specify no Darwin dependency in the build system
19+
list(APPEND swift_swiftprivate_darwin_dependencies _Builtin_float)
20+
endif()
21+
1122
add_swift_target_library(swiftSwiftPrivate ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
1223
# This file should be listed the first. Module name is inferred from the
1324
# filename.

stdlib/private/SwiftPrivateLibcExtras/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ else()
2020
set(swift_private_libc_extras_darwin_dependencies)
2121
endif()
2222

23+
if((SWIFT_BUILD_CLANG_OVERLAYS
24+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
25+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
26+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
27+
# We need to make this dependency explicit because this library
28+
# imports Darwin and Darwin re-exports _Builtin_float,
29+
# but in most configurations we pull Darwin from the SDK,
30+
# meaning we specify no Darwin dependency in the build system
31+
list(APPEND swift_private_libc_extras_darwin_dependencies _Builtin_float)
32+
endif()
33+
2334
add_swift_target_library(swiftSwiftPrivateLibcExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
2435
# This file should be listed the first. Module name is inferred from the
2536
# filename.

stdlib/private/SwiftPrivateThreadExtras/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ else()
44
set(swift_private_thread_extras_darwin_dependencies)
55
endif()
66

7+
if((SWIFT_BUILD_CLANG_OVERLAYS
8+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
9+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
10+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
11+
# We need to make this dependency explicit because this library
12+
# imports Darwin and Darwin re-exports _Builtin_float,
13+
# but in most configurations we pull Darwin from the SDK,
14+
# meaning we specify no Darwin dependency in the build system
15+
list(APPEND swift_private_thread_extras_darwin_dependencies _Builtin_float)
16+
endif()
17+
718
add_swift_target_library(swiftSwiftPrivateThreadExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
819
# This file should be listed the first. Module name is inferred from the
920
# filename.

stdlib/private/SwiftReflectionTest/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ else()
44
set(swift_reflection_test_darwin_dependencies)
55
endif()
66

7+
if((SWIFT_BUILD_CLANG_OVERLAYS
8+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
9+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
10+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
11+
# We need to make this dependency explicit because this library
12+
# imports Darwin and Darwin re-exports _Builtin_float,
13+
# but in most configurations we pull Darwin from the SDK,
14+
# meaning we specify no Darwin dependency in the build system
15+
list(APPEND swift_reflection_test_darwin_dependencies _Builtin_float)
16+
endif()
17+
718
if (SWIFT_INCLUDE_TESTS AND SWIFT_BUILD_DYNAMIC_STDLIB)
819
add_swift_target_library(swiftSwiftReflectionTest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
920
SwiftReflectionTest.swift

stdlib/public/Distributed/CMakeLists.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ if((SWIFT_BUILD_CLANG_OVERLAYS
2020
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
2121
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
2222
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
23-
set(swift_distributed_dependencies _Builtin_float)
24-
else()
25-
set(swift_distributed_dependencies)
23+
list(APPEND swift_distributed_darwin_dependencies _Builtin_float)
2624
endif()
2725

2826
set(swift_distributed_link_libraries
@@ -39,7 +37,6 @@ add_swift_target_library(swiftDistributed ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS
3937
DistributedMetadata.swift
4038
LocalTestingDistributedActorSystem.swift
4139

42-
SWIFT_MODULE_DEPENDS ${swift_distributed_dependencies}
4340
SWIFT_MODULE_DEPENDS_IOS ${swift_distributed_darwin_dependencies}
4441
SWIFT_MODULE_DEPENDS_OSX ${swift_distributed_darwin_dependencies}
4542
SWIFT_MODULE_DEPENDS_TVOS ${swift_distributed_darwin_dependencies}

stdlib/public/Synchronization/CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,15 @@ if(SWIFT_BUILD_SDK_OVERLAY)
4141
set(SWIFT_SYNCHRONIZATION_DARWIN_DEPENDENCIES Darwin)
4242
endif()
4343

44-
set(SWIFT_SYNCHRONIZATION_DEPENDENCIES)
4544
if((SWIFT_BUILD_CLANG_OVERLAYS
4645
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
4746
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
4847
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
49-
set(SWIFT_SYNCHRONIZATION_DEPENDENCIES _Builtin_float)
48+
# We need to make this dependency explicit because this library
49+
# imports Darwin and Darwin re-exports _Builtin_float,
50+
# but in most configurations we pull Darwin from the SDK,
51+
# meaning we specify no Darwin dependency in the build system
52+
list(APPEND SWIFT_SYNCHRONIZATION_DARWIN_DEPENDENCIES _Builtin_float)
5053
endif()
5154

5255
set(SWIFT_SYNCHRONIZATION_DARWIN_SOURCES
@@ -112,8 +115,6 @@ add_swift_target_library(swiftSynchronization ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES
112115
SWIFT_SOURCES_DEPENDS_FREESTANDING
113116
Mutex/MutexUnavailable.swift
114117

115-
SWIFT_MODULE_DEPENDS
116-
${SWIFT_SYNCHRONIZATION_DEPENDENCIES}
117118
SWIFT_MODULE_DEPENDS_OSX
118119
${SWIFT_SYNCHRONIZATION_DARWIN_DEPENDENCIES}
119120
SWIFT_MODULE_DEPENDS_IOS

stdlib/public/libexec/swift-backtrace/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ if(SWIFT_BUILD_SDK_OVERLAY)
1212
set(musl Musl)
1313
endif()
1414

15+
if((SWIFT_BUILD_CLANG_OVERLAYS
16+
OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
17+
AND (NOT DEFINED SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT
18+
OR NOT SWIFT_BUILD_CLANG_OVERLAYS_SKIP_BUILTIN_FLOAT))
19+
# We need to make this dependency explicit because this library
20+
# imports Darwin and Darwin re-exports _Builtin_float,
21+
# but in most configurations we pull Darwin from the SDK,
22+
# meaning we specify no Darwin dependency in the build system
23+
list(APPEND darwin _Builtin_float)
24+
endif()
25+
1526
# Similarly, we only want the Runtime dependency if we're building
1627
# with the stdlib.
1728
set(runtime)

0 commit comments

Comments
 (0)