Skip to content

Commit 2911f7a

Browse files
authored
Merge pull request #21422 from gparker42/the-5verlay-5tand5-5lone
[5.0][build] Fix generated header files in standalone overlay builds.
2 parents 83d528b + e666a57 commit 2911f7a

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

cmake/modules/StandaloneOverlay.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ precondition(SWIFT_DEST_ROOT)
5858
precondition(SWIFT_HOST_VARIANT_SDK)
5959
precondition(TOOLCHAIN_DIR)
6060

61+
# Some overlays include the runtime's headers,
62+
# and some of those headers are generated at build time.
63+
add_subdirectory("${SWIFT_SOURCE_DIR}/include" "swift/include")
64+
6165
# Without this line, installing components is broken. This needs refactoring.
6266
swift_configure_components()
6367

include/swift/CMakeLists.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
1-
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
2-
ESCAPE_QUOTES @ONLY)
1+
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_STANDALONE_OVERLAY)
2+
add_subdirectory(Runtime)
3+
endif()
34

4-
add_subdirectory(Option)
5-
add_subdirectory(SwiftRemoteMirror)
6-
add_subdirectory(Syntax)
5+
if(SWIFT_BUILD_REMOTE_MIRROR)
6+
add_subdirectory(SwiftRemoteMirror)
7+
endif()
8+
9+
if(SWIFT_INCLUDE_TOOLS)
10+
configure_file(Config.h.in ${CMAKE_CURRENT_BINARY_DIR}/Config.h
11+
ESCAPE_QUOTES @ONLY)
12+
add_subdirectory(Option)
13+
add_subdirectory(Syntax)
14+
endif()

include/swift/Runtime/CMakeLists.txt

Whitespace-only changes.

0 commit comments

Comments
 (0)