[libc][NFC] Use a end of list marker for cpu feature detection.
Without this, the array can end up being an empty array leading to
compiler failures.
GitOrigin-RevId: 7cd420649f9f68e3833ddf968ec9f39d0b9a0e57
diff --git a/cmake/modules/cpu_features/check_cpu_features.cpp.in b/cmake/modules/cpu_features/check_cpu_features.cpp.in
index 25f67a6..3771129 100644
--- a/cmake/modules/cpu_features/check_cpu_features.cpp.in
+++ b/cmake/modules/cpu_features/check_cpu_features.cpp.in
@@ -18,6 +18,9 @@
int main(int, char **) {
const char *strings[] = {
@DEFINITIONS@
+ // If DEFINITIONS turns out to be empty, we don't want to list
+ // an empty array. So, we add an end of list marker.
+ "<end_of_feature_list>"
};
const size_t size = sizeof(strings) / sizeof(strings[0]);
for (size_t i = 0; i < size; ++i) {