wasi: consistently use the wasm32-wasip1 triple
The WebAssembly community have reclaimed wasm32-wasi, without suffix,
for a future WASI 1.0 standard. The first version of WASI, 0.1, is
now wasm32-wasip1 in triple form, WASI 0.2 is wasm32-wasip2, etc.
Starting LLVM 22 the non-suffixed form is deprecated, aligning with
Rust and Go:
https://github.com/llvm/llvm-project/issues/165344
https://blog.rust-lang.org/2024/04/09/updates-to-rusts-wasi-targets/
The Mozilla build system's WASI checks always pass -Werror so
configure fails when the non-suffixed target/triple is passed using
LLVM 22:
Using wasi sysroot in /usr/local/share/wasi-sysroot
checking for the wasm C compiler... /usr/local/bin/clang22
checking whether the wasm C compiler can be used... yes
checking the wasm C compiler version... 22.1.0
checking the wasm C compiler works... yes
checking the wasm C compiler can find wasi headers... yes
checking the wasm C linker can find wasi libraries... yes
checking for the wasm C++ compiler... /usr/local/bin/clang++22
checking whether the wasm C++ compiler can be used... yes
checking the wasm C++ compiler version... 22.1.0
checking the wasm C++ compiler works... yes
checking the wasm C++ compiler can find wasi headers... yes
checking the wasm C++ linker can find wasi libraries... yes
checking for clock() in wasi sysroot... no
checking for emulated clock() in wasi sysroot...
DEBUG: Creating /tmp/conftest0vk5p554.c with content:
DEBUG: | #include <time.h>
DEBUG: | int
DEBUG: | main(void)
DEBUG: | {
DEBUG: | clock();
DEBUG: | ;
DEBUG: | return 0;
DEBUG: | }
DEBUG: Executing: /usr/local/bin/clang22 --target=wasm32-wasi /tmp/conftest0vk5p554.c -Werror -D_WASI_EMULATED_PROCESS_CLOCKS -lwasi-emulated-process-clocks --sysroot=/usr/local/share/wasi-sysroot
DEBUG: The command returned non-zero exit status 1.
DEBUG: Its error output was:
DEBUG: | clang: error: argument '--target=wasm32-wasi' is deprecated, use --target=wasm32-wasip1 instead [-Werror,-Wdeprecated]
ERROR: Can't find clock() in wasi sysroot.
Mozilla bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2023597
Bump all WASI ports for the new triple. Adjust consumers accordingly
but do not bump, since non-suffixed and p1 are identical as a
transition measure.