https://github.com/anutosh491 updated https://github.com/llvm/llvm-project/pull/116779
>From 616ebd6b6487eeaa302e6d33de3a371e6c9843f5 Mon Sep 17 00:00:00 2001 From: anutosh491 <andersonbhat...@gmail.com> Date: Tue, 19 Nov 2024 15:38:37 +0530 Subject: [PATCH 1/3] Use default visibility for symbols while building CompilerInstance against emscripten --- clang/lib/Interpreter/Interpreter.cpp | 1 + clang/lib/Interpreter/Wasm.cpp | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 73ad766e655180..999271aae7491d 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -197,6 +197,7 @@ IncrementalCompilerBuilder::CreateCpp() { Argv.push_back("-target"); Argv.push_back("wasm32-unknown-emscripten"); Argv.push_back("-shared"); + Argv.push_back("-fvisibility=default") #endif Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp index 79efbaa03982d0..6d4cc478dd6a85 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp @@ -75,7 +75,6 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) { "-shared", "--import-memory", "--no-entry", - "--export-all", "--experimental-pic", "--stack-first", "--allow-undefined", >From fedc699c66ba973798bd452b5a6607d412e4cb75 Mon Sep 17 00:00:00 2001 From: Anutosh Bhat <andersonbhat...@gmail.com> Date: Tue, 19 Nov 2024 17:27:59 +0530 Subject: [PATCH 2/3] Update Interpreter.cpp --- clang/lib/Interpreter/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Interpreter/Interpreter.cpp b/clang/lib/Interpreter/Interpreter.cpp index 999271aae7491d..00111daab01e37 100644 --- a/clang/lib/Interpreter/Interpreter.cpp +++ b/clang/lib/Interpreter/Interpreter.cpp @@ -197,7 +197,7 @@ IncrementalCompilerBuilder::CreateCpp() { Argv.push_back("-target"); Argv.push_back("wasm32-unknown-emscripten"); Argv.push_back("-shared"); - Argv.push_back("-fvisibility=default") + Argv.push_back("-fvisibility=default"); #endif Argv.insert(Argv.end(), UserArgs.begin(), UserArgs.end()); >From 4f05817d03f7bf5a9ec201c8de551810dca176f5 Mon Sep 17 00:00:00 2001 From: anutosh491 <andersonbhat...@gmail.com> Date: Tue, 19 Nov 2024 21:28:22 +0530 Subject: [PATCH 3/3] fix cleanUp --- clang/lib/Interpreter/Wasm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Interpreter/Wasm.cpp b/clang/lib/Interpreter/Wasm.cpp index 6d4cc478dd6a85..8d4bc20bcfe54f 100644 --- a/clang/lib/Interpreter/Wasm.cpp +++ b/clang/lib/Interpreter/Wasm.cpp @@ -108,7 +108,7 @@ llvm::Error WasmIncrementalExecutor::runCtors() const { return llvm::Error::success(); } -llvm::Error WasmIncrementalExecutor::cleanUp() const { +llvm::Error WasmIncrementalExecutor::cleanUp() { // Can't call cleanUp through IncrementalExecutor as it // tries to deinitialize JIT which hasn't been initialized return llvm::Error::success(); _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits