diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt index b9b76b602a856..c6c470c6d0411 100644 --- a/libc/test/CMakeLists.txt +++ b/libc/test/CMakeLists.txt @@ -25,8 +25,8 @@ if(NOT LLVM_LIBC_FULL_BUILD) return() endif() -if(NOT (${LIBC_TARGET_OS} STREQUAL "linux")) - # Integration tests are currently only available for linux. +if(NOT (${LIBC_TARGET_OS} STREQUAL "linux") OR CMAKE_COMPILER_IS_GNUCXX) + # Integration tests are currently only available for clang on linux. return() endif() add_subdirectory(integration) diff --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt index 87daefb7476ca..a9b788ca4e70a 100644 --- a/libc/test/src/CMakeLists.txt +++ b/libc/test/src/CMakeLists.txt @@ -60,12 +60,14 @@ if(${LIBC_TARGET_OS} STREQUAL "linux") add_subdirectory(pthread) endif() -if(LLVM_RUNTIMES_BUILD OR LIBC_HDRGEN_EXE) +if(LLVM_RUNTIMES_BUILD OR LIBC_HDRGEN_EXE OR CMAKE_COMPILER_IS_GNUCXX) # The public API test below uses tablegen to generate the test # source file. Since tablegen is not available during a runtimes # build, we will skip the test. # If a different libc-hdrgen binary is being used, then also we # skip the api-test as we cannot generate the test source file. + # Additionally, this is an integration test and those only work with clang + # for the moment. return() endif()