Issue |
135158
|
Summary |
[libc][test] `libc/test/UnitTest/FEnvSafeTest.cpp` is not hermetic
|
Labels |
libc
|
Assignees |
|
Reporter |
bassiounix
|
The test in `FEnvSafeTest.cpp` is not hermetic and causes build errors on Nix when using clang with no stdlib headers.
```txt
libc> FAILED: libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.o
libc> /nix/store/zpx4f2s63nqkc14jlc08n6xgj3vr2y6l-clang-wrapper-21.0.0-unstable-2025-04-09/bin/clang++ -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -DTARGET_SUPPORTS_CLOCK -I/build/libc-src-21.0.0-unstable-2025-04-09/libc -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 -Wno-comment -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=gnu++17 -fpie -ffixed-point -Wconversion -Wno-sign-conversion -Wimplicit-fallthrough -Wwrite-strings -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wstrict-prototypes -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wthread-safety -MD -MT libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.o -MF libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.o.d -o libc/test/UnitTest/CMakeFiles/LibcFPTestHelpers.unit.dir/FEnvSafeTest.cpp.o -c /build/libc-src-21.0.0-unstable-2025-04-09/libc/test/UnitTest/FEnvSafeTest.cpp
libc> In file included from /build/libc-src-21.0.0-unstable-2025-04-09/libc/test/UnitTest/FEnvSafeTest.cpp:9:
libc> In file included from /build/libc-src-21.0.0-unstable-2025-04-09/libc/test/UnitTest/FEnvSafeTest.h:12:
libc> In file included from /build/libc-src-21.0.0-unstable-2025-04-09/libc/hdr/types/fenv_t.h:18:
libc> In file included from /nix/store/4kgdnwbxq9h8qm5ckrq2hdl59gzhjh62-gcc-14-20241116/include/c++/14-20241116/fenv.h:34:
libc> In file included from /nix/store/4kgdnwbxq9h8qm5ckrq2hdl59gzhjh62-gcc-14-20241116/include/c++/14-20241116/aarch64-unknown-linux-gnu/bits/c++config.h:680:
libc> /nix/store/4kgdnwbxq9h8qm5ckrq2hdl59gzhjh62-gcc-14-20241116/include/c++/14-20241116/aarch64-unknown-linux-gnu/bits/os_defines.h:39:10: fatal error: 'features.h' file not found
libc> 39 | #include <features.h>
libc> | ^~~~~~~~~~~~
libc> 1 error generated.
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs