Skip to content

Commit

Permalink
[libc] Fix running 'stdbit.h' tests if file is never generated
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jhuber6 committed Jan 30, 2024
1 parent 3a085e9 commit 0129ff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/test/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0129ff1

Please sign in to comment.