mirror of
https://github.com/fluencelabs/wasmer
synced 2024-12-13 06:15:33 +00:00
Update to LLVM 8.0.
This commit is contained in:
parent
51556e74da
commit
ea83924547
@ -6,7 +6,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
wasmer-runtime-core = { path = "../runtime-core", version = "0.5.4" }
|
||||
inkwell = { git = "https://github.com/wasmerio/inkwell", branch = "llvm7-0" }
|
||||
inkwell = { git = "https://github.com/lumen/inkwell", rev = "64921e418c3e8f4b32f9beed56ebd5aac4e677c7", features = ["llvm8-0"] }
|
||||
wasmparser = "0.32.1"
|
||||
hashbrown = "0.1.8"
|
||||
smallvec = "0.6.8"
|
||||
|
@ -41,7 +41,7 @@ lazy_static! {
|
||||
|
||||
// Did the user give us a binary path to use? If yes, try
|
||||
// to use that and fail if it doesn't work.
|
||||
let binary_prefix_var = "LLVM_SYS_70_PREFIX";
|
||||
let binary_prefix_var = "LLVM_SYS_80_PREFIX";
|
||||
|
||||
let path = if let Some(path) = env::var_os(&binary_prefix_var) {
|
||||
Some(path.to_str().unwrap().to_owned())
|
||||
|
@ -139,24 +139,19 @@ struct SymbolLookup : llvm::JITSymbolResolver {
|
||||
public:
|
||||
SymbolLookup(callbacks_t callbacks) : callbacks(callbacks) {}
|
||||
|
||||
virtual llvm::Expected<LookupResult> lookup(const LookupSet& symbols) override {
|
||||
void lookup(const LookupSet& symbols, OnResolvedFunction OnResolved) {
|
||||
LookupResult result;
|
||||
|
||||
for (auto symbol : symbols) {
|
||||
result.emplace(symbol, symbol_lookup(symbol));
|
||||
}
|
||||
|
||||
return result;
|
||||
OnResolved(result);
|
||||
}
|
||||
|
||||
virtual llvm::Expected<LookupFlagsResult> lookupFlags(const LookupSet& symbols) override {
|
||||
LookupFlagsResult result;
|
||||
|
||||
for (auto symbol : symbols) {
|
||||
result.emplace(symbol, symbol_lookup(symbol).getFlags());
|
||||
}
|
||||
|
||||
return result;
|
||||
llvm::Expected<LookupSet> getResponsibilitySet(const LookupSet &Symbols) {
|
||||
const std::set<llvm::StringRef> empty;
|
||||
return empty;
|
||||
}
|
||||
|
||||
private:
|
||||
@ -201,4 +196,4 @@ WasmModule::WasmModule(
|
||||
void* WasmModule::get_func(llvm::StringRef name) const {
|
||||
auto symbol = runtime_dyld->getSymbol(name);
|
||||
return (void*)symbol.getAddress();
|
||||
}
|
||||
}
|
||||
|
@ -2603,7 +2603,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
|
||||
self.intrinsics.as_ref().unwrap(),
|
||||
);
|
||||
|
||||
let pass_manager = PassManager::create_for_module();
|
||||
let pass_manager = PassManager::create(());
|
||||
if cfg!(test) {
|
||||
pass_manager.add_verifier_pass();
|
||||
}
|
||||
@ -2614,7 +2614,7 @@ impl ModuleCodeGenerator<LLVMFunctionCodeGenerator, LLVMBackend, CodegenError>
|
||||
pass_manager.add_merged_load_store_motion_pass();
|
||||
pass_manager.add_new_gvn_pass();
|
||||
pass_manager.add_aggressive_dce_pass();
|
||||
pass_manager.run_on_module(&self.module);
|
||||
pass_manager.run_on(&self.module);
|
||||
|
||||
// self.module.print_to_stderr();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user