[libc] [llvm] [libc][math] Refactor cbrt implementation to header-only in src/__support/math folder. (PR #151837)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 3 11:16:32 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `fuchsia-x86_64-linux` running on `fuchsia-debian-64-us-central1-a-1` while building `libc,utils` at step 4 "annotate".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/11/builds/21004
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[922/2526] Copying CXX header __chrono/local_info.h
[923/2526] Copying CXX header __atomic/support/c11.h
[924/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.ffmal.dir/ffmal.cpp.obj
[925/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.duplocale.dir/duplocale.cpp.obj
[926/2526] Copying CXX header __chrono/month.h
[927/2526] Building CXX object libc/src/wchar/CMakeFiles/libc.src.wchar.wctob.dir/wctob.cpp.obj
[928/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.uselocale.dir/uselocale.cpp.obj
[929/2526] Copying CXX header __algorithm/ranges_set_symmetric_difference.h
[930/2526] Copying CXX header __algorithm/ranges_for_each_n.h
[931/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/./bin/clang++ --target=armv6m-none-eabi -DLIBC_NAMESPACE=__llvm_libc_22_0_0_git -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc -isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/include/armv6m-unknown-none-eabi --target=armv6m-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" "-Dfputs(string, stream)=puts(string)" -D_LIBCPP_PRINT=1 -mthumb -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 -ffunction-sections -fdata-sections -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/runtimes/runtimes-armv6m-none-eabi-bins=../../../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG --target=armv6m-none-eabi -DLIBC_QSORT_IMPL=LIBC_QSORT_HEAP_SORT -DLIBC_TYPES_TIME_T_IS_32_BIT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)" -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_EXTERNAL -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/math/generic/cbrt.cpp
In file included from /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/math/generic/cbrt.cpp:10:
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/__support/math/cbrt.h:149:9: error: unused type alias 'Float128' [-Werror,-Wunused-local-typedef]
149 | using Float128 = fputil::DyadicFloat<128>;
| ^
1 error generated.
[932/2526] Copying CXX header __algorithm/ranges_sort.h
[933/2526] Building CXX object libc/src/setjmp/arm/CMakeFiles/libc.src.setjmp.arm.longjmp.dir/longjmp.cpp.obj
[934/2526] Copying CXX header __algorithm/find_if.h
[935/2526] Copying CXX header __algorithm/ranges_generate.h
[936/2526] Copying CXX header __bit_reference
[937/2526] Copying CXX header __atomic/atomic_flag.h
[938/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.freelocale.dir/freelocale.cpp.obj
[939/2526] Building CXX object libc/src/setjmp/arm/CMakeFiles/libc.src.setjmp.arm.setjmp.dir/setjmp.cpp.obj
[940/2526] Copying CXX header __algorithm/ranges_generate_n.h
[941/2526] Building CXX object libc/src/wctype/CMakeFiles/libc.src.wctype.iswalpha.dir/iswalpha.cpp.obj
[942/2526] Building CXX object libc/src/compiler/generic/CMakeFiles/libc.src.compiler.generic.__stack_chk_fail.dir/__stack_chk_fail.cpp.obj
[943/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.localeconv.dir/localeconv.cpp.obj
[944/2526] Copying CXX header __algorithm/ranges_includes.h
[945/2526] Building CXX object libc/src/wchar/CMakeFiles/libc.src.wchar.btowc.dir/btowc.cpp.obj
[946/2526] Building CXX object libc/src/time/baremetal/CMakeFiles/libc.src.time.baremetal.clock.dir/clock.cpp.obj
[947/2526] Copying CXX header __algorithm/ranges_is_partitioned.h
[948/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.atan.dir/atan.cpp.obj
[949/2526] Copying CXX header __algorithm/find_first_of.h
[950/2526] Copying CXX header __algorithm/ranges_inplace_merge.h
[951/2526] Copying CXX header __algorithm/ranges_is_heap_until.h
[952/2526] Copying CXX header __algorithm/ranges_is_permutation.h
[953/2526] Copying CXX header __algorithm/ranges_is_sorted_until.h
[954/2526] Building CXX object libc/startup/baremetal/CMakeFiles/libc.startup.baremetal.init.dir/init.cpp.obj
[955/2526] Copying CXX header __algorithm/ranges_iterator_concept.h
[956/2526] Copying CXX header __algorithm/ranges_is_sorted.h
[957/2526] Building CXX object libc/startup/baremetal/arm/CMakeFiles/libc.startup.baremetal.arm.crt1.dir/start.cpp.obj
[958/2526] Copying CXX header __algorithm/find_end.h
[959/2526] Copying CXX header __algorithm/ranges_lexicographical_compare.h
[960/2526] Copying CXX header __algorithm/find.h
[961/2526] Building CXX object libc/startup/baremetal/CMakeFiles/libc.startup.baremetal.fini.dir/fini.cpp.obj
[962/2526] Building CXX object libc/src/time/CMakeFiles/libc.src.time.gmtime.dir/gmtime.cpp.obj
[963/2526] Copying CXX header __algorithm/fill_n.h
Step 6 (build) failure: build (failure)
...
[922/2526] Copying CXX header __chrono/local_info.h
[923/2526] Copying CXX header __atomic/support/c11.h
[924/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.ffmal.dir/ffmal.cpp.obj
[925/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.duplocale.dir/duplocale.cpp.obj
[926/2526] Copying CXX header __chrono/month.h
[927/2526] Building CXX object libc/src/wchar/CMakeFiles/libc.src.wchar.wctob.dir/wctob.cpp.obj
[928/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.uselocale.dir/uselocale.cpp.obj
[929/2526] Copying CXX header __algorithm/ranges_set_symmetric_difference.h
[930/2526] Copying CXX header __algorithm/ranges_for_each_n.h
[931/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj
FAILED: libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/./bin/clang++ --target=armv6m-none-eabi -DLIBC_NAMESPACE=__llvm_libc_22_0_0_git -I/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc -isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/include/armv6m-unknown-none-eabi --target=armv6m-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" "-Dfputs(string, stream)=puts(string)" -D_LIBCPP_PRINT=1 -mthumb -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 -ffunction-sections -fdata-sections -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-pkqq4dx0/runtimes/runtimes-armv6m-none-eabi-bins=../../../../llvm-project -ffile-prefix-map=/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/= -no-canonical-prefixes -Os -DNDEBUG --target=armv6m-none-eabi -DLIBC_QSORT_IMPL=LIBC_QSORT_HEAP_SORT -DLIBC_TYPES_TIME_T_IS_32_BIT -DLIBC_ADD_NULL_CHECKS "-DLIBC_MATH=(LIBC_MATH_SKIP_ACCURATE_PASS | LIBC_MATH_SMALL_TABLES)" -DLIBC_ERRNO_MODE=LIBC_ERRNO_MODE_EXTERNAL -DLIBC_THREAD_MODE=LIBC_THREAD_MODE_SINGLE -fpie -ffreestanding -DLIBC_FULL_BUILD -nostdlibinc -ffixed-point -fno-builtin -fno-exceptions -fno-lax-vector-conversions -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-rtti -ftrivial-auto-var-init=pattern -fno-omit-frame-pointer -Wall -Wextra -Werror -Wconversion -Wno-sign-conversion -Wdeprecated -Wno-c99-extensions -Wno-gnu-imaginary-constant -Wno-pedantic -Wimplicit-fallthrough -Wwrite-strings -Wextra-semi -Wnewline-eof -Wnonportable-system-include-path -Wstrict-prototypes -Wthread-safety -Wglobal-constructors -DLIBC_COPT_PUBLIC_PACKAGING -MD -MT libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj -MF libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj.d -o libc/src/math/generic/CMakeFiles/libc.src.math.generic.cbrt.dir/cbrt.cpp.obj -c /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/math/generic/cbrt.cpp
In file included from /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/math/generic/cbrt.cpp:10:
/var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/libc/src/__support/math/cbrt.h:149:9: error: unused type alias 'Float128' [-Werror,-Wunused-local-typedef]
149 | using Float128 = fputil::DyadicFloat<128>;
| ^
1 error generated.
[932/2526] Copying CXX header __algorithm/ranges_sort.h
[933/2526] Building CXX object libc/src/setjmp/arm/CMakeFiles/libc.src.setjmp.arm.longjmp.dir/longjmp.cpp.obj
[934/2526] Copying CXX header __algorithm/find_if.h
[935/2526] Copying CXX header __algorithm/ranges_generate.h
[936/2526] Copying CXX header __bit_reference
[937/2526] Copying CXX header __atomic/atomic_flag.h
[938/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.freelocale.dir/freelocale.cpp.obj
[939/2526] Building CXX object libc/src/setjmp/arm/CMakeFiles/libc.src.setjmp.arm.setjmp.dir/setjmp.cpp.obj
[940/2526] Copying CXX header __algorithm/ranges_generate_n.h
[941/2526] Building CXX object libc/src/wctype/CMakeFiles/libc.src.wctype.iswalpha.dir/iswalpha.cpp.obj
[942/2526] Building CXX object libc/src/compiler/generic/CMakeFiles/libc.src.compiler.generic.__stack_chk_fail.dir/__stack_chk_fail.cpp.obj
[943/2526] Building CXX object libc/src/locale/CMakeFiles/libc.src.locale.localeconv.dir/localeconv.cpp.obj
[944/2526] Copying CXX header __algorithm/ranges_includes.h
[945/2526] Building CXX object libc/src/wchar/CMakeFiles/libc.src.wchar.btowc.dir/btowc.cpp.obj
[946/2526] Building CXX object libc/src/time/baremetal/CMakeFiles/libc.src.time.baremetal.clock.dir/clock.cpp.obj
[947/2526] Copying CXX header __algorithm/ranges_is_partitioned.h
[948/2526] Building CXX object libc/src/math/generic/CMakeFiles/libc.src.math.generic.atan.dir/atan.cpp.obj
[949/2526] Copying CXX header __algorithm/find_first_of.h
[950/2526] Copying CXX header __algorithm/ranges_inplace_merge.h
[951/2526] Copying CXX header __algorithm/ranges_is_heap_until.h
[952/2526] Copying CXX header __algorithm/ranges_is_permutation.h
[953/2526] Copying CXX header __algorithm/ranges_is_sorted_until.h
[954/2526] Building CXX object libc/startup/baremetal/CMakeFiles/libc.startup.baremetal.init.dir/init.cpp.obj
[955/2526] Copying CXX header __algorithm/ranges_iterator_concept.h
[956/2526] Copying CXX header __algorithm/ranges_is_sorted.h
[957/2526] Building CXX object libc/startup/baremetal/arm/CMakeFiles/libc.startup.baremetal.arm.crt1.dir/start.cpp.obj
[958/2526] Copying CXX header __algorithm/find_end.h
[959/2526] Copying CXX header __algorithm/ranges_lexicographical_compare.h
[960/2526] Copying CXX header __algorithm/find.h
[961/2526] Building CXX object libc/startup/baremetal/CMakeFiles/libc.startup.baremetal.fini.dir/fini.cpp.obj
[962/2526] Building CXX object libc/src/time/CMakeFiles/libc.src.time.gmtime.dir/gmtime.cpp.obj
[963/2526] Copying CXX header __algorithm/fill_n.h
```
</details>
https://github.com/llvm/llvm-project/pull/151837
More information about the llvm-commits
mailing list