Skip to content

Commit

Permalink
[libc] disable integration tests when using gcc
Browse files Browse the repository at this point in the history
The integration tests were failing to build under GCC due to missing
compile options for using LLVM's libc++ and compiler-rt.

This should unblock #60467

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D145128
  • Loading branch information
michaelrj-google committed Mar 2, 2023
1 parent 4d635be commit 8350494
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libc/test/CMakeLists.txt
Expand Up @@ -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)
4 changes: 3 additions & 1 deletion libc/test/src/CMakeLists.txt
Expand Up @@ -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()

Expand Down

0 comments on commit 8350494

Please sign in to comment.