[libc-commits] [libc] 0129ff1 - [libc] Fix running 'stdbit.h' tests if file is never generated

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Jan 30 07:23:12 PST 2024


Author: Joseph Huber
Date: 2024-01-30T09:23:05-06:00
New Revision: 0129ff17a9885d76d3700fee56500848c28e3fc1

URL: https://github.com/llvm/llvm-project/commit/0129ff17a9885d76d3700fee56500848c28e3fc1
DIFF: https://github.com/llvm/llvm-project/commit/0129ff17a9885d76d3700fee56500848c28e3fc1.diff

LOG: [libc] Fix running 'stdbit.h' tests if file is never generated

Summary:
This test was added to test the generated header. Unfortunately this
doesn't work if the header is never generated. Add a check to make sure
the user has included it in the list of headers.

Added: 
    

Modified: 
    libc/test/include/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/test/include/CMakeLists.txt b/libc/test/include/CMakeLists.txt
index 6a586cd715cf8..2730fa0d66db7 100644
--- a/libc/test/include/CMakeLists.txt
+++ b/libc/test/include/CMakeLists.txt
@@ -17,7 +17,7 @@ add_libc_test(
 
 # stdbit_test only tests our generated stdbit.h, which is not generated in
 # overlay mode.
-if (LLVM_LIBC_FULL_BUILD)
+if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS)
   add_libc_test(
     stdbit_test
     SUITE


        


More information about the libc-commits mailing list