Skip to content

Commit 3ba843a

Browse files
committed
Reflection: conditionally build the target library
There is a build of the reflection library for the tools which we want to build if we are building the tools. The target library should only be built if we are building the standard library.
1 parent f64f02b commit 3ba843a

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

stdlib/public/Reflection/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ if (LLVM_ENABLE_ASSERTIONS)
1919
"${SWIFT_SOURCE_DIR}/lib/Demangling/NodeDumper.cpp")
2020
endif(LLVM_ENABLE_ASSERTIONS)
2121

22-
add_swift_target_library(swiftReflection STATIC TARGET_LIBRARY
23-
${swiftReflection_SOURCES}
24-
C_COMPILE_FLAGS ${SWIFT_RUNTIME_CXX_FLAGS}
25-
LINK_FLAGS ${SWIFT_RUNTIME_LINK_FLAGS}
26-
INSTALL_IN_COMPONENT dev)
22+
if(SWIFT_BUILD_STDLIB)
23+
add_swift_target_library(swiftReflection STATIC TARGET_LIBRARY
24+
${swiftReflection_SOURCES}
25+
C_COMPILE_FLAGS ${SWIFT_RUNTIME_CXX_FLAGS}
26+
LINK_FLAGS ${SWIFT_RUNTIME_LINK_FLAGS}
27+
INSTALL_IN_COMPONENT dev)
28+
endif()
2729

2830
# Build a specific version for the host with the host toolchain. This is going
2931
# to be used by tools (e.g. lldb)

0 commit comments

Comments
 (0)