[WebAssembly] Fix CPU tests in wasm-features.c (#80900)
The CPU tests in this file are not working as intended. Specifying `-mcpu=[mvp|generic|bleeding-edge]` in `clang` command line does NOT add arguments like `-target-feature`, `+feature-name`, ... to `clang-14` command line. Specifying `-mcpu=[mvp|generic|bleeding-edge]` in `clang` command line will just add `-target-cpu` `[mvp|generic|bleeding-edge]` to `clang-14` command line, and individual features are added here within `clang-14` invocation: https://github.com/llvm/llvm-project/blob/5b780c8c6c558ec283a9eec485a4f172df0f9fe1/clang/lib/Basic/Targets/WebAssembly.cpp#L150-L163 The reason these CPU tests are passing is because they only have `-NOT` checks, and we don't emit `-target-feature` arguments for them anyway, the test passes, but they don't check what they are supposed to check. This make CPU tests only check `-target-cpu` lines instead of individual features, which will not be emitted.
Loading
Please sign in to comment