Skip to content

Commit 4ef7df9

Browse files
committed
do not define and register symbols if emscripten
1 parent 740bcb3 commit 4ef7df9

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
@@ -92,7 +92,7 @@
9292

9393
// Runtime symbols required if the library using JIT (Cpp::Evaluate) does not
9494
// link to llvm
95-
#ifndef CPPINTEROP_USE_CLING
95+
#if !defined(CPPINTEROP_USE_CLING) && !defined(EMSCRIPTEN)
9696
#if CLANG_VERSION_MAJOR >= 22
9797
extern "C" void* __clang_Interpreter_SetValueWithAlloc(void* This, void* OutVal,
9898
void* OpaqueType)
@@ -3356,7 +3356,7 @@ CPPINTEROP_API JitCall MakeFunctionCallable(TCppConstFunction_t func) {
33563356
}
33573357

33583358
namespace {
3359-
#ifndef CPPINTEROP_USE_CLING
3359+
#if !defined(CPPINTEROP_USE_CLING) && !defined(EMSCRIPTEN)
33603360
static bool DefineAbsoluteSymbol(compat::Interpreter& I,
33613361
const char* linker_mangled_name,
33623362
uint64_t address) {
@@ -3501,7 +3501,7 @@ TInterp_t CreateInterpreter(const std::vector<const char*>& Args /*={}*/,
35013501
assert(sInterpreters->size() == sInterpreterASTMap->size());
35023502

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

0 commit comments

Comments
 (0)