Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
Allow pulling in of libLLVMSupport for cxx11 string ABI detection
Browse files Browse the repository at this point in the history
This is necessary on platforms where `libLLVM` is split up into multiple
shared libraries, so a single `libLLVM` does not exist.
  • Loading branch information
staticfloat committed Oct 3, 2018
1 parent 92cb40f commit 00f4910
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/PlatformNames.jl
Original file line number Diff line number Diff line change
Expand Up @@ -639,11 +639,17 @@ close enough for our purposes, as you can't mix linkages between Julia and LLVM
are not compiled in the same way).
"""
function detect_cxx11_string_abi()
hdl = dlopen(@static Sys.iswindows() ? "LLVM" : "libLLVM")
if hdl == C_NULL
function open_libllvm()
for lib_name in ("libLLVM", "LLVM", "libLLVMSupport")
hdl = dlopen_e(lib_name)
if hdl != C_NULL
return hdl
end
end
error("Unable to open libLLVM!")
end

hdl = open_libllvm()
# Check for llvm::sys::getProcessTriple(), first without cxx11 tag:
if dlsym_e(hdl, "_ZN4llvm3sys16getProcessTripleEv") != C_NULL
return :cxx03
Expand Down

0 comments on commit 00f4910

Please sign in to comment.