Skip to content

Commit

Permalink
Fix LLVM 3.9 build
Browse files Browse the repository at this point in the history
Force LLVM to emit the code before we look for function addresses.
  • Loading branch information
yuyichao committed Apr 2, 2016
1 parent 8c17d60 commit f7780c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/jitlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,9 +397,12 @@ class JuliaOJIT {
);
SmallVector<std::unique_ptr<Module>,1> Ms;
Ms.push_back(std::move(M));
return CompileLayer.addModuleSet(std::move(Ms),
MemMgr,
std::move(Resolver));
auto modset = CompileLayer.addModuleSet(std::move(Ms), MemMgr,
std::move(Resolver));
// Force LLVM to emit the module so that we can register the symbols
// in our lookup table.
CompileLayer.emitAndFinalize(modset);
return modset;
}

void removeModule(ModuleHandleT H)
Expand Down

0 comments on commit f7780c9

Please sign in to comment.