mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-04 18:38:37 +00:00
[Support] Use HAVE_DLOPEN to guard dlopen(3) usage
Summary: The usage was previously guarded by HAVE_DLFCN. This breaks on Android with LLVM_BUILD_STATIC as the platform does not provide a static version of libdl. Using HAVE_DLOPEN fixes it as the code will only get used if we are actually able to link an executable using dlopen. Reviewers: rafael, beanz Subscribers: tberghammer, danalbert, llvm-commits Differential Revision: https://reviews.llvm.org/D26504 llvm-svn: 288246
This commit is contained in:
parent
d2bc24d393
commit
b6eaa31191
@ -41,7 +41,7 @@ char llvm::sys::DynamicLibrary::Invalid = 0;
|
||||
|
||||
#else
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
|
||||
#include <dlfcn.h>
|
||||
using namespace llvm;
|
||||
using namespace llvm::sys;
|
||||
@ -119,7 +119,7 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char *symbolName) {
|
||||
return i->second;
|
||||
}
|
||||
|
||||
#if HAVE_DLFCN_H
|
||||
#if defined(HAVE_DLFCN_H) && defined(HAVE_DLOPEN)
|
||||
// Now search the libraries.
|
||||
if (OpenedHandles) {
|
||||
for (DenseSet<void *>::iterator I = OpenedHandles->begin(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user