Fix #2408 - add -d:globalSymbols (#14904)

This commit is contained in:
genotrance 2020-07-21 12:14:36 -05:00 • committed by GitHub
commit 450a3e3179
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -91,7 +91,10 @@ when defined(posix):
dlclose(lib)
proc nimLoadLibrary(path: string): LibHandle =
result = dlopen(path, RTLD_NOW)
let flags =
when defined(globalSymbols): RTLD_NOW or RTLD_GLOBAL
else: RTLD_NOW
result = dlopen(path, flags)
when defined(nimDebugDlOpen):
let error = dlerror()
if error != nil: