Commit 7bc6b785 authored by Yixing Lao's avatar Yixing Lao Committed by Robert Kimball

RTLD_GLOBAL fix codgen link (#984)

parent b1b3d4d6
......@@ -44,7 +44,7 @@ void* runtime::Backend::open_shared_library(const string& type)
{
void* handle = nullptr;
string name = "lib" + to_lower(type) + "_backend.so";
handle = dlopen(name.c_str(), RTLD_NOW);
handle = dlopen(name.c_str(), RTLD_NOW | RTLD_GLOBAL);
if (handle)
{
function<void()> create = reinterpret_cast<void (*)()>(dlsym(handle, "create_backend"));
......
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