[libc-commits] [libc] 5c9629a - [libc][fix] Also remove the headers for the other flags

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Wed Apr 26 15:08:28 PDT 2023


Author: Joseph Huber
Date: 2023-04-26T17:08:18-05:00
New Revision: 5c9629a714203276c9662313b5b86c0330a6a1b4

URL: https://github.com/llvm/llvm-project/commit/5c9629a714203276c9662313b5b86c0330a6a1b4
DIFF: https://github.com/llvm/llvm-project/commit/5c9629a714203276c9662313b5b86c0330a6a1b4.diff

LOG: [libc][fix] Also remove the headers for the other flags

Summary:
This patch makes this only apply to the GPU build. This should be
handled more intelligently in the future so it's common between all of t
hem.

Added: 
    

Modified: 
    libc/test/UnitTest/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt
index 1404f0dbb130..2f38c61594e9 100644
--- a/libc/test/UnitTest/CMakeLists.txt
+++ b/libc/test/UnitTest/CMakeLists.txt
@@ -27,7 +27,7 @@ add_library(
 
 foreach(lib LibcUnitTest LibcHermeticTest)
   target_include_directories(${lib} PUBLIC ${LIBC_SOURCE_DIR})
-  if(LLVM_LIBC_FULL_BUILD)
+  if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
     # If we are in full build mode, then we should use our own public headers.
     target_include_directories(${lib} PRIVATE ${LIBC_BUILD_DIR}/include)
   endif()
@@ -52,7 +52,7 @@ add_library(
 
 target_include_directories(LibcTestMain PUBLIC ${LIBC_SOURCE_DIR})
 target_compile_options(LibcTestMain PRIVATE -fno-exceptions -fno-rtti)
-if(LIBC_GPU_BUILD)
+if(LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES)
   target_include_directories(LibcTestMain PRIVATE ${LIBC_BUILD_DIR}/include)
   target_compile_options(LibcTestMain PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS})
 endif()


        


More information about the libc-commits mailing list