[libc-commits] [libc] [libc] Template the writing mode for the writer class (PR #111559)
via libc-commits
libc-commits at lists.llvm.org
Thu Mar 13 14:26:26 PDT 2025
PiJoules wrote:
I think that fix led to a different failure mode
```
[709/2837](61) Building CXX object libc/src/stdio/baremetal/CMakeFiles/libc.src.stdio.baremetal.printf.dir/printf.cpp.obj
FAILED: libc/src/stdio/baremetal/CMakeFiles/libc.src.stdio.baremetal.printf.dir/printf.cpp.obj
/b/s/w/ir/x/w/llvm_build/./bin/clang++ --target=armv6m-none-eabi -DLIBC_NAMESPACE=__llvm_libc_21_0_0_git -I/b/s/w/ir/x/w/llvm-llvm-project/libc -isystem /b/s/w/ir/x/w/llvm_build/include/armv6m-unknown-none-eabi --target=armv6m-none-eabi -Wno-atomic-alignment "-Dvfprintf(stream, format, vlist)=vprintf(format, vlist)" "-Dfprintf(stream, format, ...)=printf(format)" -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=/b/s/w/ir/x/w/llvm_build/runtimes/runtimes-armv6m-none-eabi-bins=../../../llvm-llvm-project -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -Os -DNDEBUG -std=gnu++17 --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)" -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 -UNDEBUG -DLIBC_COPT_PRINTF_DISABLE_FLOAT -DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE -DLIBC_COPT_PRINTF_DISABLE_WRITE_INT -DLIBC_COPT_PRINTF_DISABLE_FIXED_POINT -DLIBC_COPT_PRINTF_DISABLE_STRERROR -DLIBC_COPT_PRINTF_RUNTIME_DISPATCH -MD -MT libc/src/stdio/baremetal/CMakeFiles/libc.src.stdio.baremetal.printf.dir/printf.cpp.obj -MF libc/src/stdio/baremetal/CMakeFiles/libc.src.stdio.baremetal.printf.dir/printf.cpp.obj.d -o libc/src/stdio/baremetal/CMakeFiles/libc.src.stdio.baremetal.printf.dir/printf.cpp.obj -c /b/s/w/ir/x/w/llvm-llvm-project/libc/src/stdio/baremetal/printf.cpp
/b/s/w/ir/x/w/llvm-llvm-project/libc/src/stdio/baremetal/printf.cpp:41:33: error: use of undeclared identifier 'WriteMode'; did you mean 'printf_core::WriteMode'?
41 | printf_core::WriteBuffer<Mode<WriteMode::FLUSH_TO_STREAM>::value> wb(
| ^~~~~~~~~
| printf_core::WriteMode
/b/s/w/ir/x/w/llvm-llvm-project/libc/src/stdio/printf_core/writer.h:24:12: note: 'printf_core::WriteMode' declared here
24 | enum class WriteMode {
| ^
/b/s/w/ir/x/w/llvm-llvm-project/libc/src/stdio/baremetal/printf.cpp:41:28: error: no template named 'Mode'; did you mean 'printf_core::Mode'?
41 | printf_core::WriteBuffer<Mode<WriteMode::FLUSH_TO_STREAM>::value> wb(
| ^~~~
| printf_core::Mode
/b/s/w/ir/x/w/llvm-llvm-project/libc/src/stdio/printf_core/writer.h:33:40: note: 'printf_core::Mode' declared here
33 | template <WriteMode write_mode> struct Mode {
| ^
```
Seen on https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8720479269949913185/overview which includes https://github.com/llvm/llvm-project/commit/6fea340023af6ccbaed2d7fe790df565bcf75170.
https://github.com/llvm/llvm-project/pull/111559
More information about the libc-commits
mailing list