Skip to content

Commit e7a8bf7

Browse files
committed
CMake: Add GlibC Clang Overlay to export set
Adding the Glibc Clang Overlay interface target to the installed export set. The interface library exists to plumb the appropriate flags through the build graph and ensure that the modulemap and header file are generated when depended on. Interface libraries need to be in the export set when depended on by a public library to ensure that the appropriate install interface flags are exposed to targets importing the library from outside of the build system, regardless of whether the interface library actually installs any files. This fixes the configuration-time error: Export called with target "swiftGlibc" which requires "SwiftGlibcClangOverlay" that is not in any export set.
1 parent 5cc8264 commit e7a8bf7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Runtimes/Overlay/Linux/glibc/clang/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ add_library(SwiftGlibcClangOverlay INTERFACE
2828
target_compile_options(SwiftGlibcClangOverlay INTERFACE
2929
"$<BUILD_INTERFACE:$<$<COMPILE_LANGUAGE:Swift>:SHELL:-vfsoverlay ${CMAKE_CURRENT_BINARY_DIR}/glibc-overlay.yml>>")
3030

31+
install(TARGETS SwiftGlibcClangOverlay EXPORT SwiftOverlayTargets)
32+
3133
install(
3234
FILES
3335
"${CMAKE_CURRENT_BINARY_DIR}/glibc.modulemap"

0 commit comments

Comments
 (0)