File tree 4 files changed +10
-4
lines changed
4 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class IncrementalExecutor {
56
56
virtual llvm::Error addModule (PartialTranslationUnit &PTU);
57
57
virtual llvm::Error removeModule (PartialTranslationUnit &PTU);
58
58
virtual llvm::Error runCtors () const ;
59
- llvm::Error cleanUp ();
59
+ virtual llvm::Error cleanUp ();
60
60
llvm::Expected<llvm::orc::ExecutorAddr>
61
61
getSymbolAddress (llvm::StringRef Name, SymbolNameKind NameKind) const ;
62
62
Original file line number Diff line number Diff line change @@ -196,7 +196,6 @@ IncrementalCompilerBuilder::CreateCpp() {
196
196
#ifdef __EMSCRIPTEN__
197
197
Argv.push_back (" -target" );
198
198
Argv.push_back (" wasm32-unknown-emscripten" );
199
- Argv.push_back (" -pie" );
200
199
Argv.push_back (" -shared" );
201
200
#endif
202
201
Argv.insert (Argv.end (), UserArgs.begin (), UserArgs.end ());
Original file line number Diff line number Diff line change @@ -72,13 +72,13 @@ llvm::Error WasmIncrementalExecutor::addModule(PartialTranslationUnit &PTU) {
72
72
OutputFile.close ();
73
73
74
74
std::vector<const char *> LinkerArgs = {" wasm-ld" ,
75
- " -pie " ,
75
+ " -shared " ,
76
76
" --import-memory" ,
77
77
" --no-entry" ,
78
78
" --export-all" ,
79
79
" --experimental-pic" ,
80
- " --no-export-dynamic" ,
81
80
" --stack-first" ,
81
+ " --allow-undefined" ,
82
82
OutputFileName.c_str (),
83
83
" -o" ,
84
84
OutputFileName.c_str ()};
@@ -109,6 +109,12 @@ llvm::Error WasmIncrementalExecutor::runCtors() const {
109
109
return llvm::Error::success ();
110
110
}
111
111
112
+ llvm::Error WasmIncrementalExecutor::cleanUp () const {
113
+ // Can't call cleanUp through IncrementalExecutor as it
114
+ // tries to deinitialize JIT which hasn't been initialized
115
+ return llvm::Error::success ();
116
+ }
117
+
112
118
WasmIncrementalExecutor::~WasmIncrementalExecutor () = default ;
113
119
114
120
} // namespace clang
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class WasmIncrementalExecutor : public IncrementalExecutor {
28
28
llvm::Error addModule (PartialTranslationUnit &PTU) override ;
29
29
llvm::Error removeModule (PartialTranslationUnit &PTU) override ;
30
30
llvm::Error runCtors () const override ;
31
+ llvm::Error cleanUp () override ;
31
32
32
33
~WasmIncrementalExecutor () override ;
33
34
};
You can’t perform that action at this time.
0 commit comments