Skip to content

Commit 25fc2c2

Browse files
committed
Re-enable reference types by default
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 llvm#90792.
1 parent 271eb06 commit 25fc2c2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

clang/docs/ReleaseNotes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -881,10 +881,10 @@ AIX Support
881881
WebAssembly Support
882882
^^^^^^^^^^^^^^^^^^^
883883

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

889889
AVR Support
890890
^^^^^^^^^^^

clang/lib/Basic/Targets/WebAssembly.cpp

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)