Skip to content

Commit

Permalink
[Build System: CMake] Move the CompatibilityDynamicReplacements libra…
Browse files Browse the repository at this point in the history
…ry into the stdlib/toolchain source directory.
  • Loading branch information
Rostepher committed Jul 23, 2019
1 parent 1a8dff8 commit 3257761
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
1 change: 0 additions & 1 deletion stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ if(SWIFT_BUILD_STDLIB)
add_subdirectory(stubs)
add_subdirectory(core)
add_subdirectory(SwiftOnoneSupport)
add_subdirectory(CompatibilityDynamicReplacements)
endif()

if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_REMOTE_MIRROR)
Expand Down
12 changes: 0 additions & 12 deletions stdlib/public/CompatibilityDynamicReplacements/CMakeLists.txt

This file was deleted.

1 change: 1 addition & 0 deletions stdlib/toolchain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ endif()

add_subdirectory(legacy_layouts)
add_subdirectory(Compatibility50)
add_subdirectory(CompatibilityDynamicReplacements)
28 changes: 28 additions & 0 deletions stdlib/toolchain/CompatibilityDynamicReplacements/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set(library_name "swiftCompatibilityDynamicReplacements")

add_swift_target_library("${library_name}" STATIC TARGET_LIBRARY
DynamicReplaceable.cpp

TARGET_SDKS ${SWIFT_APPLE_PLATFORMS}

C_COMPILE_FLAGS ${CXX_COMPILE_FLAGS}
LINK_FLAGS ${CXX_LINK_FLAGS}
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}

INSTALL_IN_COMPONENT compiler
INSTALL_WITH_SHARED)


# FIXME: We need a more flexible mechanism to add lipo targets generated by
# add_swift_target_library to the ALL target. Until then this hack is necessary
# to ensure these libraries build.
foreach(sdk ${SWIFT_SDKS})
set(target_name "${library_name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
if(NOT TARGET "${target_name}")
continue()
endif()

set_target_properties("${target_name}"
PROPERTIES
EXCLUDE_FROM_ALL FALSE)
endforeach()
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#include "swift/Runtime/Once.h"
#include "swift/Runtime/Exclusivity.h"
#include "../runtime/ThreadLocalStorage.h"
#include "../../public/runtime/ThreadLocalStorage.h"

using namespace swift;

Expand Down

0 comments on commit 3257761

Please sign in to comment.