[libc-commits] [PATCH] D145128: [libc] disable integration tests when using gcc

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Mar 1 16:30:12 PST 2023


michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.

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 https://github.com/llvm/llvm-project/issues/60467


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145128

Files:
  libc/test/CMakeLists.txt
  libc/test/src/CMakeLists.txt


Index: libc/test/src/CMakeLists.txt
===================================================================
--- libc/test/src/CMakeLists.txt
+++ libc/test/src/CMakeLists.txt
@@ -60,12 +60,14 @@
   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()
 
Index: libc/test/CMakeLists.txt
===================================================================
--- libc/test/CMakeLists.txt
+++ libc/test/CMakeLists.txt
@@ -25,8 +25,8 @@
   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)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145128.501695.patch
Type: text/x-patch
Size: 1277 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230302/9a2d0a31/attachment.bin>


More information about the libc-commits mailing list