File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,18 @@ if(("${SWIFT_HOST_VARIANT_SDK}" STREQUAL "${SWIFT_PRIMARY_VARIANT_SDK}") AND
140140 target_include_directories (SwiftRuntimeTests BEFORE PRIVATE
141141 ${SWIFT_SOURCE_DIR} /stdlib/public )
142142
143+ # `stdlib/include/llvm/Support` headers, a subset of
144+ # `llvm-project/llvm/include/llvm/Support`, are not compatible with the
145+ # latter.
146+ #
147+ # Since we favor stdlib headers here, this makes sure Support headers will not
148+ # be transitively included through gtest, and helps to avoid mixed includes,
149+ # where a Support header existing only in LLVM is picked from LLVM, whereas
150+ # a Support header existing in both of the aforementioned directories is
151+ # picked from our stdlib.
152+ target_compile_definitions (SwiftRuntimeTests PRIVATE
153+ GTEST_NO_LLVM_SUPPORT)
154+
143155 # FIXME: cross-compile for all variants.
144156 target_link_libraries (SwiftRuntimeTests
145157 PRIVATE
You can’t perform that action at this time.
0 commit comments