Skip to content

Commit 92d4e76

Browse files
committed
[Build System: CMake] Move the CompatibilityDynamicReplacements library into the stdlib/toolchain source directory.
(cherry picked from commit 3257761)
1 parent b10c502 commit 92d4e76

File tree

5 files changed

+30
-13
lines changed

5 files changed

+30
-13
lines changed

stdlib/public/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ if(SWIFT_BUILD_STDLIB)
6161
add_subdirectory(stubs)
6262
add_subdirectory(core)
6363
add_subdirectory(SwiftOnoneSupport)
64-
add_subdirectory(CompatibilityDynamicReplacements)
6564
endif()
6665

6766
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_REMOTE_MIRROR)

stdlib/public/CompatibilityDynamicReplacements/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

stdlib/toolchain/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,4 @@ endif()
4444

4545
add_subdirectory(legacy_layouts)
4646
add_subdirectory(Compatibility50)
47+
add_subdirectory(CompatibilityDynamicReplacements)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
set(library_name "swiftCompatibilityDynamicReplacements")
2+
3+
add_swift_target_library("${library_name}" STATIC TARGET_LIBRARY
4+
DynamicReplaceable.cpp
5+
6+
TARGET_SDKS ${SWIFT_APPLE_PLATFORMS}
7+
8+
C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
9+
LINK_FLAGS ${CXX_LINK_FLAGS}
10+
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
11+
12+
INSTALL_IN_COMPONENT compiler
13+
INSTALL_WITH_SHARED)
14+
15+
16+
# FIXME: We need a more flexible mechanism to add lipo targets generated by
17+
# add_swift_target_library to the ALL target. Until then this hack is necessary
18+
# to ensure these libraries build.
19+
foreach(sdk ${SWIFT_SDKS})
20+
set(target_name "${library_name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
21+
if(NOT TARGET "${target_name}")
22+
continue()
23+
endif()
24+
25+
set_target_properties("${target_name}"
26+
PROPERTIES
27+
EXCLUDE_FROM_ALL FALSE)
28+
endforeach()

stdlib/public/CompatibilityDynamicReplacements/DynamicReplaceable.cpp renamed to stdlib/toolchain/CompatibilityDynamicReplacements/DynamicReplaceable.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
#include "swift/Runtime/Once.h"
2121
#include "swift/Runtime/Exclusivity.h"
22-
#include "../runtime/ThreadLocalStorage.h"
22+
#include "../../public/runtime/ThreadLocalStorage.h"
2323

2424
using namespace swift;
2525

0 commit comments

Comments
 (0)