Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ include(GNUInstallDirs)
if (CPPINTEROP_USE_CLING)
message(STATUS "Mode CPPINTEROP_USE_CLING = ON")
find_package(LLVM REQUIRED CONFIG ${llvm_search_hints} NO_DEFAULT_PATH)
if(EMSCRIPTEN)
find_package(LLD REQUIRED CONFIG ${lld_search_hints} NO_DEFAULT_PATH)
endif()
find_package(Clang REQUIRED CONFIG ${clang_search_hints} NO_DEFAULT_PATH)
find_package(Cling REQUIRED CONFIG ${cling_search_hints} NO_DEFAULT_PATH)
endif(CPPINTEROP_USE_CLING)
Expand Down
6 changes: 5 additions & 1 deletion lib/CppInterOp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,11 @@ if(EMSCRIPTEN)
# unit tests main_module you get errors due to undefined symbols. The reading of the file
# below into a SYMBOLS_LIST variable is a temporary workaround that exports the undefined
# symbols from the shared library, until it can be determined why they are not being exported already.
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/exports.ld" SYMBOLS_LIST)
if (CPPINTEROP_USE_CLING)
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/cling-exports.ld" SYMBOLS_LIST)
else()
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/exports.ld" SYMBOLS_LIST)
endif()

# Replace newlines with spaces
string(REPLACE "\n" " " SYMBOLS_LIST "${SYMBOLS_LIST}")
Expand Down
33 changes: 33 additions & 0 deletions lib/CppInterOp/cling-exports.ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
-Wl,--export=_ZN4llvm13StringMapImpl11RehashTableEj
-Wl,--export=_ZN4llvm13StringMapImpl15LookupBucketForENS_9StringRefEj
-Wl,--export=_ZN4llvm13StringMapImpl4hashENS_9StringRefE
-Wl,--export=_ZN4llvm15SmallVectorBaseIjE8grow_podEPvmm
-Wl,--export=_ZN4llvm15allocate_bufferEmm
-Wl,--export=_ZN4llvm3sys17RunningOnValgrindEv
-Wl,--export=_ZN4llvm5APIntC1EjNS_8ArrayRefIyEE
-Wl,--export=_ZN5clang11DeclContext7classofEPKNS_4DeclE
-Wl,--export=_ZN5clang4Decl17castToDeclContextEPKS0_
-Wl,--export=_ZNK4llvm5APInt13compareSignedERKS0_
-Wl,--export=_ZNK4llvm5APInt4sextEj
-Wl,--export=_ZNK4llvm5APInt4zextEj
-Wl,--export=_ZNK4llvm5APInt7compareERKS0_
-Wl,--export=_ZNK5clang10ASTContext14getComplexTypeENS_8QualTypeE
-Wl,--export=_ZNK5clang10ASTContext19getTypeDeclTypeSlowEPKNS_8TypeDeclE
-Wl,--export=_ZNK5clang10ASTContext22getLValueReferenceTypeENS_8QualTypeEb
-Wl,--export=_ZNK5clang10RecordDecl19isInjectedClassNameEv
-Wl,--export=_ZNK5clang11DeclContext11decls_beginEv
-Wl,--export=_ZNK5clang11DeclContext6lookupENS_15DeclarationNameE
-Wl,--export=_ZNK5clang12FunctionDecl12getNumParamsEv
-Wl,--export=_ZNK5clang12FunctionDecl29getTemplateSpecializationArgsEv
-Wl,--export=_ZNK5clang12FunctionDecl31getTemplateInstantiationPatternEb
-Wl,--export=_ZNK5clang17ClassTemplateDecl18getSpecializationsEv
-Wl,--export=_ZNK5clang29VarTemplateSpecializationDecl22getSpecializedTemplateEv
-Wl,--export=_ZNK5clang4Decl13getASTContextEv
-Wl,--export=_ZNK5clang4Decl15hasDefiningAttrEv
-Wl,--export=_ZNK5clang4Sema15getStdNamespaceEv
-Wl,--export=_ZNK5clang4Type14isFloatingTypeEv
-Wl,--export=_ZNK5clang4Type27getUnqualifiedDesugaredTypeEv
-Wl,--export=_ZNK5clang7TagType7getDeclEv
-Wl,--export=_ZNK5clang7VarDecl28isThisDeclarationADefinitionERNS_10ASTContextE
-Wl,--export=_ZN4llvm3sys2fs17getMainExecutableEPKcPv
-Wl,--export=_ZN4llvm3sys4path6appendERNS_15SmallVectorImplIcEERKNS_5TwineES7_S7_S7_
Loading