llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.33k stars 12.13k forks source link

[libc] {u}lkbits broken on riscv32 #115778

Open nickdesaulniers opened 2 weeks ago

nickdesaulniers commented 2 weeks ago

114912 broke the riscv32 buildbot:

libc/src/stdfix/lkbits.cpp:16:10: error: no matching function for call to 'bit_cast' 16 | return cpp::bit_cast<long accum, int_lk_t>(x); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/libc/src/__support/CPP/bit.h:38:1: note: candidate template ignored: substitution failure [with To = long _Accum, From = int_lk_t]: implicit instantiation of undefined template '__llvm_libc_20_0_0_git::cpp::enable_if<false, long _Accum>' 38 | bit_cast(const From &from) { | ^

I'm going to disable this for now.

Reproducible via:

$ cmake ../runtimes -G Ninja -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_RUNTIMES="libc" -DLIBC_TARGET_TRIPLE=riscv32-linux-gnu -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
$ ninja libc

cc @smallp-o-p

llvmbot commented 2 weeks ago

@llvm/issue-subscribers-libc

Author: Nick Desaulniers (nickdesaulniers)

#114912 broke the riscv32 buildbot: ``` libc/src/stdfix/lkbits.cpp:16:10: error: no matching function for call to 'bit_cast' 16 | return cpp::bit_cast<long accum, int_lk_t>(x); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ llvm-project/libc/src/__support/CPP/bit.h:38:1: note: candidate template ignored: substitution failure [with To = long _Accum, From = int_lk_t]: implicit instantiation of undefined template '__llvm_libc_20_0_0_git::cpp::enable_if<false, long _Accum>' 38 | bit_cast(const From &from) { | ^ ``` I'm going to disable this for now. Reproducible via: ``` $ cmake ../runtimes -G Ninja -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_RUNTIMES="libc" -DLIBC_TARGET_TRIPLE=riscv32-linux-gnu -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ $ ninja libc ``` cc @smallp-o-p
smallp-o-p commented 2 weeks ago

I'll investigate.

nickdesaulniers commented 2 weeks ago

argh ulkbits also has this issue