Can not disable sign-ext feature for wasm32 target #109807
Closed
Description
opened on Mar 31, 2023
I tried to build a wasm binary with MVP opcode only, so I disabled the features:
RUSTFLAGS='-C link-arg=-zstack-size=32768 -C target-feature=-mutable-globals,-sign-ext,-multivalue,-simd128'
cargo build --release --target=wasm32-unknown-unknown
I expected to see no sign-extension opcode in the wasm binary.
Instead, this happened:
$ wasm-tools parse -t target/wasm32-unknown-unknown/release/output.wasm -o hello.wat
$ cat hello.wat | grep i32.ext
i32.extend8_s
Meta
rustc --version --verbose
:
rustc 1.70.0-nightly (ec2f40c6b 2023-03-30)
binary: rustc
commit-hash: ec2f40c6b04f0e9850dd1f454e8639d319f4ed9b
commit-date: 2023-03-30
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 16.0.0
Backtrace
<backtrace>
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generationArea: Enabling/disabling target features like AVX, Neon, etc.Category: This is a bug.Target: WASM (WebAssembly), http://webassembly.org/Relevant to the compiler team, which will review and decide on the PR/issue.
Activity