Commit 4dc5c720 by Zhixun Tan Committed by Tianqi Chen

Change CodeGenCPU::GetPackedFuncHandle to generate global variable with InternalLinkage. (#901)

Emscripten seems to not have done initialization properly.
parent 677175ea
......@@ -483,7 +483,7 @@ llvm::Value* CodeGenCPU::GetPackedFuncHandle(const std::string& fname) {
// create the function handle
hptr = new llvm::GlobalVariable(
*module_, t_tvm_func_handle_, false,
llvm::GlobalValue::LinkOnceAnyLinkage, 0, ".tvm_func." + fname);
llvm::GlobalValue::InternalLinkage, nullptr, ".tvm_func." + fname);
hptr->setAlignment(align);
hptr->setInitializer(llvm::Constant::getNullValue(t_tvm_func_handle_));
func_handle_map_[fname] = hptr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment