Skip to content

Commit b781d14

Browse files
marcelamelaramasomel
authored andcommitted
Add boiler plate flag for differentiating between wasm runtime modes in enclave
Signed-off-by: Marcela Melara <[email protected]>
1 parent bf671a0 commit b781d14

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

common/interpreter/wawaka_wasm/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ IF (WASM_MODE STREQUAL "AOT")
6363
# Disable Interpreter for AoT mode
6464
set (WAMR_BUILD_INTERP 0)
6565
set (WAMR_BUILD_FAST_INTERP 0)
66+
add_definitions (-DAOT_WASM_RT=1)
6667
message(STATUS "Building wawaka in AOT mode")
6768
message(FATAL_ERROR "AoT mode is not currently implemented")
6869
ELSE ()

common/interpreter/wawaka_wasm/WawakaInterpreter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,14 @@ extern bool RegisterNativeFunctions(void);
4242

4343
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
4444
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
45+
#ifdef AOT_WASM_RT
46+
const std::string WawakaInterpreter::identity_ = "wawaka-aot";
47+
#else
4548
const std::string WawakaInterpreter::identity_ = "wawaka";
49+
#endif
4650

51+
// TODO: Produce verifiable info about runtime built into this enclave
52+
// See issue #255
4753
std::string pdo::contracts::GetInterpreterIdentity(void)
4854
{
4955
return WawakaInterpreter::identity_;

0 commit comments

Comments
 (0)