diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp b/clang/lib/Basic/Targets/WebAssembly.cpp --- a/clang/lib/Basic/Targets/WebAssembly.cpp +++ b/clang/lib/Basic/Targets/WebAssembly.cpp @@ -102,8 +102,10 @@ if (CPU == "bleeding-edge") { Features["nontrapping-fptoint"] = true; Features["sign-ext"] = true; + Features["bulk-memory"] = true; Features["atomics"] = true; Features["mutable-globals"] = true; + Features["tail-call"] = true; setSIMDLevel(Features, SIMD128); } // Other targets do not consider user-configured features here, but while we diff --git a/clang/test/Preprocessor/wasm-target-features.c b/clang/test/Preprocessor/wasm-target-features.c --- a/clang/test/Preprocessor/wasm-target-features.c +++ b/clang/test/Preprocessor/wasm-target-features.c @@ -124,12 +124,14 @@ // // BLEEDING-EDGE-DAG:#define __wasm_nontrapping_fptoint__ 1{{$}} // BLEEDING-EDGE-DAG:#define __wasm_sign_ext__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_bulk_memory__ 1{{$}} // BLEEDING-EDGE-DAG:#define __wasm_simd128__ 1{{$}} // BLEEDING-EDGE-DAG:#define __wasm_atomics__ 1{{$}} // BLEEDING-EDGE-DAG:#define __wasm_mutable_globals__ 1{{$}} +// BLEEDING-EDGE-DAG:#define __wasm_tail_call__ 1{{$}} // BLEEDING-EDGE-NOT:#define __wasm_unimplemented_simd128__ 1{{$}} +// BLEEDING-EDGE-NOT:#define __wasm_exception_handling__ 1{{$}} // BLEEDING-EDGE-NOT:#define __wasm_multivalue__ 1{{$}} -// BLEEDING-EDGE-NOT:#define __wasm_tail_call__ 1{{$}} // RUN: %clang -E -dM %s -o - 2>&1 \ // RUN: -target wasm32-unknown-unknown -mcpu=bleeding-edge -mno-simd128 \