[libcxx] wasi needs dedicated locale_base_api/wasi.h for _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
```cpp
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:180:83: error:
use of undeclared identifier 'cntrl'
180 | ...& ~(std::make_unsigned::type)(space | print | cntrl | upper | lowe...
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:180:91: error:
use of undeclared identifier 'upper'
180 | ...& ~(std::make_unsigned::type)(space | print | cntrl | upper | lowe...
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:180:99: error:
use of undeclared identifier 'lower'
180 | ...| print | cntrl | upper | lower | alpha |
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:180:107: error:
use of undeclared identifier 'alpha'
180 | ...| print | cntrl | upper | lower | alpha |
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:181:67: error:
use of undeclared identifier 'digit'
181 | digit ...
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:181:75: error:
use of undeclared identifier 'punct'
181 | ...digit | punct | xdigit | blank)) == __regex_word,
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:181:83: error:
use of undeclared identifier 'xdigit'
181 | ...digit | punct | xdigit | blank)) == __regex_word,
| ^~~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:181:92: error:
use of undeclared identifier 'blank'
181 | ...digit | punct | xdigit | blank)) == __regex_word,
| ^~~~~
/home/aglniae/toolchains/llvm/wasm-sysroots/wasm-noeh-memtag-sysroot/wasm32-wasip1/wasm32-wasip1/include/c++/v1/__locale_dir/ctype_base.h:181:103: error:
use of undeclared identifier '__regex_word'
181 | ...digit | punct | xdigit | blank)) == __regex_word,
| ^~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
```
Contributor guide
Research direction
Reproduce the WASI build failure and inspect __locale_dir/ctype_base.h, along with the requested locale_base_api/wasi.h. Confirm how the missing locale constants are expected to be provided, then verify that the affected WASI libc++ build no longer reports the undeclared identifiers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, wasm
- Domain
- compilers, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100