Skip to content

[NFC] Move WinSDK.swift overlay #41785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions stdlib/cmake/modules/SwiftSource.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -844,13 +844,17 @@ function(_compile_swift_files
endif()
endif()

# First generate the obj dirs
# First generate the obj dirs if not created before
list(REMOVE_DUPLICATES dirs_to_create)
add_custom_command_target(
create_dirs_dependency_target
COMMAND "${CMAKE_COMMAND}" -E make_directory ${dirs_to_create}
OUTPUT ${dirs_to_create}
COMMENT "Generating dirs for ${first_output}")
list(REMOVE_ITEM dirs_to_create ${CREATED_OBJ_DIRS})
if(NOT dirs_to_create STREQUAL "")
add_custom_command_target(
create_dirs_dependency_target
COMMAND "${CMAKE_COMMAND}" -E make_directory ${dirs_to_create}
OUTPUT ${dirs_to_create}
COMMENT "Generating dirs for ${first_output}")
set(CREATED_OBJ_DIRS ${CREATED_OBJ_DIRS} ${dirs_to_create} CACHE INTERNAL "Already created obj directories")
endif()

# Then we can compile both the object files and the swiftmodule files
# in parallel in this target for the object file, and ...
Expand Down
9 changes: 0 additions & 9 deletions stdlib/public/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,3 @@ endif()
if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
add_subdirectory(Platform)
endif()

if(SWIFT_BUILD_SDK_OVERLAY)
# On Apple platforms, we aren't building any overlays (other than Darwin in
# Platform above). Instead, we're picking them up from the SDK.

if(WINDOWS IN_LIST SWIFT_SDKS)
add_subdirectory(Windows)
endif()
endif()
10 changes: 10 additions & 0 deletions stdlib/public/Platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ add_swift_target_library(swiftCRT ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_SDK_OVE
TARGET_SDKS WINDOWS
INSTALL_IN_COMPONENT sdk-overlay)

add_swift_target_library(swiftWinSDK ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_SDK_OVERLAY
WinSDK.swift

SWIFT_COMPILE_FLAGS
${SWIFT_RUNTIME_SWIFT_COMPILE_FLAGS}
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
TARGET_SDKS WINDOWS
INSTALL_IN_COMPONENT sdk-overlay)

set(glibc_modulemap_target_list)
foreach(sdk ${SWIFT_SDKS})
if(NOT "${sdk}" STREQUAL "LINUX" AND
Expand Down
8 changes: 0 additions & 8 deletions stdlib/public/Windows/CMakeLists.txt

This file was deleted.