These tests use libc headers and need to explicitly include them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
libc/test/src/__support/CMakeLists.txt | ||
---|---|---|
126–127 | This one should not use the LIBC_INCLUDE_DIR since it's intended to use the system's libc. This is to allow for accuracy and speed comparisons. |
Comment Actions
This breaks my GPU libc builds
FAILED: libc/test/src/__support/CMakeFiles/libc_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o /home/jhuber/Documents/llvm/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/jhuber/Documents/llvm/llvm-project/build/runtimes/runtimes-bins/libc/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -UNDEBUG -MD -MT libc/test/src/__support/CMakeFiles/libc_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o -MF libc/test/src/__support/CMakeFiles/libc_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o.d -o libc/test/src/__support/CMakeFiles/libc_str_to_float_comparison_test.dir/str_to_float_comparison_test.cpp.o -c /home/jhuber/Documents/llvm/llvm-project/libc/test/src/__support/str_to_float_comparison_test.cpp In file included from /home/jhuber/Documents/llvm/llvm-project/libc/test/src/__support/str_to_float_comparison_test.cpp:16: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/fstream:40: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/istream:40: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/ios:44: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/ios_base.h:41: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/locale_classes.h:40: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/string:54: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/bits/basic_string.h:4110: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/ext/string_conversions.h:43: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/13.1.1/../../../../include/c++/13.1.1/cstdlib:79: /usr/include/stdlib.h:63:5: error: typedef redefinition with different types ('struct div_t' vs 'struct div_t') 63 | } div_t; | ^ /home/jhuber/Documents/llvm/llvm-project/build/runtimes/runtimes-bins/libc/include/llvm-libc-types/div_t.h:15:3: note: previous definition is here 15 | } div_t; | ^
Among other, similar errors.
This one should not use the LIBC_INCLUDE_DIR since it's intended to use the system's libc. This is to allow for accuracy and speed comparisons.