-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[libc] express proper dependencies for stdbit include test #80318
Conversation
If the entrypoints aren't available for a target, don't run the include test. We should add these entrypoints to more targets, but in addition I should stop breaking the build when I add more functions to this include test.
@llvm/pr-subscribers-libc Author: Nick Desaulniers (nickdesaulniers) ChangesIf the entrypoints aren't available for a target, don't run the include test. We should add these entrypoints to more targets, but in addition I should stop Full diff: https://github.com/llvm/llvm-project/pull/80318.diff 1 Files Affected:
diff --git a/libc/test/include/CMakeLists.txt b/libc/test/include/CMakeLists.txt
index 2730fa0d66db7..a63defcb1f6f3 100644
--- a/libc/test/include/CMakeLists.txt
+++ b/libc/test/include/CMakeLists.txt
@@ -17,7 +17,18 @@ add_libc_test(
# stdbit_test only tests our generated stdbit.h, which is not generated in
# overlay mode.
-if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS)
+message(STATUS "TARGET_PUBLIC_HEADERS is ${TARGET_PUBLIC_HEADERS}")
+if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS
+ AND libc.src.stdbit.stdc_leading_zeros_uc IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_zeros_us IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_zeros_ui IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_zeros_ul IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_zeros_ull IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_ones_uc IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_ones_us IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_ones_ui IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_ones_ul IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS
+ AND libc.src.stdbit.stdc_leading_ones_ull IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS)
add_libc_test(
stdbit_test
SUITE
|
@@ -17,7 +17,18 @@ add_libc_test( | |||
|
|||
# stdbit_test only tests our generated stdbit.h, which is not generated in | |||
# overlay mode. | |||
if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS) | |||
message(STATUS "TARGET_PUBLIC_HEADERS is ${TARGET_PUBLIC_HEADERS}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this should be behind a check for the verbose logging flag (or removed)
if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS) | ||
message(STATUS "TARGET_PUBLIC_HEADERS is ${TARGET_PUBLIC_HEADERS}") | ||
if(LLVM_LIBC_FULL_BUILD AND libc.include.stdbit IN_LIST TARGET_PUBLIC_HEADERS | ||
AND libc.src.stdbit.stdc_leading_zeros_uc IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't need to check for all of these in the entrypoints list. If you just add them to the dependency list it will skip the test if they aren't available. The only one that currently needs to be checked manually is the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I think the issue with that approach though would be that those then get linked into the test?
Hmm...what do you think about this approach instead?
#80323
If the entrypoints aren't available for a target, don't run the include test.
We should add these entrypoints to more targets, but in addition I should stop
breaking the build when I add more functions to this include test.