Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #42609, export LLVMExtra symbols #42613

Merged
merged 1 commit into from
Oct 13, 2021
Merged

fix #42609, export LLVMExtra symbols #42613

merged 1 commit into from
Oct 13, 2021

Conversation

JeffBezanson
Copy link
Member

fix #42609

@vtjnash
Copy link
Member

vtjnash commented Oct 12, 2021

Can you also fix the loader_lib code to prevent this from regressing:

diff --git a/cli/loader_lib.c b/cli/loader_lib.c
index abc144c41c..8e0adf7ed2 100644
--- a/cli/loader_lib.c
+++ b/cli/loader_lib.c
@@ -41,10 +41,10 @@ static void * load_library(const char * rel_path, const char * src_dir, int err)
             break;
     basename++;
 #if defined(_OS_WINDOWS_)
-    if ((handle = GetModuleHandleW(basename)))
+    if ((handle = GetModuleHandleA(basename)))
         return handle;
 #else
-    if ((handle = dlopen(basename, RTLD_NOLOAD | RTLD_NOW | RTLD_GLOBAL)))
+    if ((handle = dlopen(basename, RTLD_NOLOAD | RTLD_NOW | (err ? RTLD_GLOBAL : RTLD_LOCAL))))
         return handle;
 #endif
 
@@ -61,7 +61,7 @@ static void * load_library(const char * rel_path, const char * src_dir, int err)
     }
     handle = (void *)LoadLibraryExW(wpath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH);
 #else
-    handle = dlopen(path, RTLD_NOW | RTLD_GLOBAL);
+    handle = dlopen(path, RTLD_NOW | (err ? RTLD_GLOBAL : RTLD_LOCAL));
 #endif
 
     if (handle == NULL) {

Copy link
Member

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, verified that this fixes the issue.

@vchuravy vchuravy merged commit 3b1ec5a into master Oct 13, 2021
@vchuravy vchuravy deleted the jb/llvmextra branch October 13, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separation of codegen/runtime hides LLVM passes on Windows
4 participants