From fd352f3ffabd00daf2759ab4a3276729e52eeb10 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sun, 12 Mar 2023 13:25:18 +0900 Subject: [PATCH] Do not use prefixed clang for wasi Rust 1.68 (https://github.com/rust-lang/rust/pull/106489) broke this: ``` = note: clang-15: error: unsupported option '--export' clang-15: error: unsupported option '--stack-first' clang-15: error: unsupported option '--allow-undefined' clang-15: error: unsupported option '--fatal-warnings' clang-15: error: unsupported option '--no-demangle' clang-15: error: unsupported option '--gc-sections' clang-15: error: unknown argument: '-flavor' clang-15: error: no such file or directory: 'wasm' clang-15: error: no such file or directory: '__main_void' ``` --- .github/workflows/ci.yml | 12 +----------- CHANGELOG.md | 2 ++ main.sh | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 972a3a2..ef3c3bd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -96,17 +96,7 @@ jobs: # WASI # rustup target list | grep -e '-wasi' # rustc --print target-list | grep -e '-wasi' - # TODO(wasi): - # = note: clang-15: error: unsupported option '--export' - # clang-15: error: unsupported option '--stack-first' - # clang-15: error: unsupported option '--allow-undefined' - # clang-15: error: unsupported option '--fatal-warnings' - # clang-15: error: unsupported option '--no-demangle' - # clang-15: error: unsupported option '--gc-sections' - # clang-15: error: unknown argument: '-flavor' - # clang-15: error: no such file or directory: 'wasm' - # clang-15: error: no such file or directory: '__main_void' - # - wasm32-wasi + - wasm32-wasi os: - ubuntu-22.04 - ubuntu-20.04 diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a038bd..5880e2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com ## [Unreleased] +- Fix linker error for wasm32-wasi on Rust 1.68+. + ## [1.6.1] - 2022-12-13 - Improve robustness for temporary network failures. diff --git a/main.sh b/main.sh index c9aece9..a82006b 100755 --- a/main.sh +++ b/main.sh @@ -112,7 +112,7 @@ install_rust_cross_toolchain() { *) qemu_ld_prefix="${toolchain_dir}/${target}" ;; esac case "${target}" in - *-freebsd | *-wasi) + *-freebsd) cat >>"${GITHUB_ENV}" <>"${GITHUB_ENV}" <