File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 11file (READ wasm-intrinsics.wat WASM_INTRINSICS_WAT HEX)
2+ set (CMAKE_CONFIGURE_DEPENDS wasm-intrinsics.wat)
23
34string (REGEX MATCHALL "([A-Fa-f0-9][A-Fa-f0-9])" SEPARATED_HEX ${WASM_INTRINSICS_WAT} )
45
5- # WASM_INTRINSICS_EMBED_2 and WASM_INTRINSICS_SIZE_2 should be renamed each time
6- # the content of the wat file changes. This is not strictly necessary, as CMake
7- # should use the fresh contents each time, but even just re-running CMake
8- # manually is not enough in practice (one needs to also erase the CMake temp
9- # files, or use a fresh build dir). Renaming the vars keeps things working
10- # smoothly for people with existing checkouts.
11- set (WASM_INTRINSICS_SIZE_2 1)
126foreach (hex IN LISTS SEPARATED_HEX)
13- string (APPEND WASM_INTRINSICS_EMBED_2 "0x${hex} ," )
14- math (EXPR WASM_INTRINSICS_SIZE_2 "${WASM_INTRINSICS_SIZE_2} +1" )
7+ string (APPEND WASM_INTRINSICS_EMBED "0x${hex} ," )
158endforeach ()
16- string (APPEND WASM_INTRINSICS_EMBED_2 "0x00" )
9+ string (APPEND WASM_INTRINSICS_EMBED "0x00" )
1710
1811configure_file (WasmIntrinsics.cpp.in WasmIntrinsics.cpp @ONLY)
1912
Original file line number Diff line number Diff line change 11#include "passes/intrinsics-module.h"
22
3- static const char theModule[@WASM_INTRINSICS_SIZE_2@ ] = {
4- @WASM_INTRINSICS_EMBED_2 @
3+ static const char theModule[] = {
4+ @WASM_INTRINSICS_EMBED @
55};
66
77namespace wasm {
You can’t perform that action at this time.
0 commit comments