Skip to content

Commit c9dc241

Browse files
committed
Enable FEATURE_WEBCIL for WASI and include webcildecoder.h in pregeneratedstringthunks
The new R2R string-thunk infrastructure added in dotnet#127483 uses WebcilDecoder inside a TARGET_WASM block. FEATURE_WEBCIL was only enabled for CLR_CMAKE_TARGET_BROWSER, so the WASI build hit 'unknown type name WebcilDecoder'. Enable FEATURE_WEBCIL for WASI too and add a guarded include. Co-authored-by: Copilot <[email protected]>
1 parent e847050 commit c9dc241

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/coreclr/clrfeatures.cmake‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ if(CLR_CMAKE_TARGET_ARCH_WASM)
7474
set(FEATURE_PORTABLE_HELPERS 1)
7575
endif(CLR_CMAKE_TARGET_ARCH_WASM)
7676

77-
if(CLR_CMAKE_TARGET_BROWSER)
77+
if(CLR_CMAKE_TARGET_BROWSER OR CLR_CMAKE_TARGET_WASI)
7878
set(FEATURE_WEBCIL 1)
7979
endif()
8080

‎src/coreclr/vm/pregeneratedstringthunks.cpp‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
#include "loaderallocator.hpp"
1414
#include "wasm/helpers.hpp"
1515
#include "precode_portable.hpp"
16+
#ifdef FEATURE_WEBCIL
17+
#include "webcildecoder.h"
18+
#endif
1619

1720
static StringToThunkHash* s_pPregeneratedStringThunks = nullptr;
1821

0 commit comments

Comments
 (0)