Skip to content

Commit 6e38df3

Browse files
authored
[WebAssembly] Re-enable reference types by default (#93261)
Now that we are about to upgrade emsdk's default node to v18.20.3 (emscripten-core/emsdk#1387), we can re-enable reference-types by default again. This effectively reverts #90792.
1 parent edf2d0a commit 6e38df3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clang/docs/ReleaseNotes.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -1035,10 +1035,10 @@ AIX Support
10351035
WebAssembly Support
10361036
^^^^^^^^^^^^^^^^^^^
10371037

1038-
The -mcpu=generic configuration now enables multivalue feature, which is
1039-
standardized and available in all major engines. Enabling multivalue here only
1040-
enables the language feature but does not turn on the multivalue ABI (this
1041-
enables non-ABI uses of multivalue, like exnref).
1038+
The -mcpu=generic configuration now enables multivalue and reference-types.
1039+
These proposals are standardized and available in all major engines. Enabling
1040+
multivalue here only enables the language feature but does not turn on the
1041+
multivalue ABI (this enables non-ABI uses of multivalue, like exnref).
10421042

10431043
AVR Support
10441044
^^^^^^^^^^^

clang/lib/Basic/Targets/WebAssembly.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ bool WebAssemblyTargetInfo::initFeatureMap(
153153
auto addGenericFeatures = [&]() {
154154
Features["multivalue"] = true;
155155
Features["mutable-globals"] = true;
156+
Features["reference-types"] = true;
156157
Features["sign-ext"] = true;
157158
};
158159
auto addBleedingEdgeFeatures = [&]() {
@@ -164,7 +165,6 @@ bool WebAssemblyTargetInfo::initFeatureMap(
164165
Features["half-precision"] = true;
165166
Features["multimemory"] = true;
166167
Features["nontrapping-fptoint"] = true;
167-
Features["reference-types"] = true;
168168
Features["tail-call"] = true;
169169
setSIMDLevel(Features, RelaxedSIMD, true);
170170
};

clang/test/Preprocessor/wasm-target-features.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@
164164
//
165165
// GENERIC-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}}
166166
// GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}}
167+
// GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}}
167168
// GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}}
168169
//
169170
// RUN: %clang -E -dM %s -o - 2>&1 \
@@ -180,7 +181,6 @@
180181
// GENERIC-NOT: #define __wasm_half_precision__ 1{{$}}
181182
// GENERIC-NOT: #define __wasm_multimemory__ 1{{$}}
182183
// GENERIC-NOT: #define __wasm_nontrapping_fptoint__ 1{{$}}
183-
// GENERIC-NOT: #define __wasm_reference_types__ 1{{$}}
184184
// GENERIC-NOT: #define __wasm_relaxed_simd__ 1{{$}}
185185
// GENERIC-NOT: #define __wasm_simd128__ 1{{$}}
186186
// GENERIC-NOT: #define __wasm_tail_call__ 1{{$}}

0 commit comments

Comments
 (0)