Skip to content

Commit 2629793

Browse files
committed
do not define and register symbols if emscripten
1 parent 15d8600 commit 2629793

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/CppInterOp/CppInterOp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888

8989
// Runtime symbols required if the library using JIT (Cpp::Evaluate) does not
9090
// link to llvm
91-
#ifndef CPPINTEROP_USE_CLING
91+
#if !defined(CPPINTEROP_USE_CLING) && !defined(EMSCRIPTEN)
9292
#if CLANG_VERSION_MAJOR >= 22
9393
extern "C" void* __clang_Interpreter_SetValueWithAlloc(void* This, void* OutVal,
9494
void* OpaqueType)
@@ -3195,7 +3195,7 @@ CPPINTEROP_API JitCall MakeFunctionCallable(TCppConstFunction_t func) {
31953195
}
31963196

31973197
namespace {
3198-
#ifndef CPPINTEROP_USE_CLING
3198+
#if !defined(CPPINTEROP_USE_CLING) && !defined(EMSCRIPTEN)
31993199
static bool DefineAbsoluteSymbol(compat::Interpreter& I,
32003200
const char* linker_mangled_name,
32013201
uint64_t address) {
@@ -3331,7 +3331,7 @@ TInterp_t CreateInterpreter(const std::vector<const char*>& Args /*={}*/,
33313331
sInterpreters->emplace_back(I, /*Owned=*/true);
33323332

33333333
// Define runtime symbols in the JIT dylib for clang-repl
3334-
#ifndef CPPINTEROP_USE_CLING
3334+
#if !defined(CPPINTEROP_USE_CLING) && !defined(EMSCRIPTEN)
33353335
// llvm > 22 has this defined as a C symbol that does not require mangling
33363336
#if CLANG_VERSION_MAJOR >= 22
33373337
DefineAbsoluteSymbol(*I, "__clang_Interpreter_SetValueWithAlloc",

0 commit comments

Comments
 (0)