Skip to content

Commit

Permalink
Upgrade build system to BB2 --take 2
Browse files Browse the repository at this point in the history
Add Linux i686 and Windows x86_64 binaries
  • Loading branch information
Gnimuc committed Mar 10, 2019
1 parent 8076faa commit 9061ae0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
2 changes: 2 additions & 0 deletions deps/build_libcxxffi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ products = [
download_info = Dict(
Linux(:x86_64, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("https://github.com/Gnimuc/CxxBuilder/releases/download/v0.0.0-1/libcxxffi.v0.0.0.x86_64-linux-gnu-gcc7.tar.gz", "8dc796c0577973d09270b79b50a57b547938426951f8830fbec5270d35ffde8e"),
MacOS(:x86_64, compiler_abi=CompilerABI(:gcc7)) => ("https://github.com/Gnimuc/CxxBuilder/releases/download/v0.0.0-2/libcxxffi.v0.0.0.x86_64-apple-darwin14-gcc7.tar.gz", "812b78869a318299e33d69fba738514521a139621f5a85633fbcbfd0b58fae6e"),
Windows(:x86_64, compiler_abi=CompilerABI(:gcc7)) => ("https://github.com/Gnimuc/CxxBuilder/releases/download/v0.0.0-3/libcxxffi.v0.0.0.x86_64-w64-mingw32-gcc7.tar.gz", "6376078764d629029039c2e988a2befb9af8eaab56deae49b10272d87130ac81"),
Linux(:i686, libc=:glibc, compiler_abi=CompilerABI(:gcc7)) => ("https://github.com/Gnimuc/CxxBuilder/releases/download/v0.0.0-4/libcxxffi.v0.0.0.i686-linux-gnu-gcc7.tar.gz", "a9896701a7dfd96f94541e45cf58506b9690f405c6d1a354f718089f34668786"),
)

# Install unsatisfied or updated dependencies:
Expand Down
21 changes: 12 additions & 9 deletions src/initialization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ depspath = joinpath(BASE_JULIA_SRC, "deps", "srccache")

# Load the Cxx.jl bootstrap library (in debug version if we're running the Julia
# debug version)

const libcxxffi = joinpath(dirname(Base.source_path()),"../deps/usr/lib/",
string("libcxxffi", ccall(:jl_is_debugbuild, Cint, ()) != 0 ? "-debug" : ""))

@static if Sys.iswindows()
const libcxxffi = joinpath(dirname(Base.source_path()),"../deps/usr/bin/",
string("libcxxffi", ccall(:jl_is_debugbuild, Cint, ()) != 0 ? "-debug" : ""))
else
const libcxxffi = joinpath(dirname(Base.source_path()),"../deps/usr/lib/",
string("libcxxffi", ccall(:jl_is_debugbuild, Cint, ()) != 0 ? "-debug" : ""))
end
# Set up Clang's global data structures
function init_libcxxffi()
# Force libcxxffi to be opened with RTLD_GLOBAL
Expand Down Expand Up @@ -358,11 +361,11 @@ end # function addStdHeaders(C)
end # islinux

@static if iswindows() function collectStdHeaders!(headers)
base = "C:/mingw-builds/x64-4.8.1-win32-seh-rev5/mingw64/"
push!(headers,(joinpath(base,"x86_64-w64-mingw32/include"), C_System))
#addHeaderDir(joinpath(base,"lib/gcc/x86_64-w64-mingw32/4.8.1/include/"), kind = C_System)
push!(headers,(joinpath(base,"lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++"), C_System))
push!(headers,(joinpath(base,"lib/gcc/x86_64-w64-mingw32/4.8.1/include/c++/x86_64-w64-mingw32"), C_System))
base = joinpath(@__DIR__, "..", "deps", "usr")
push!(headers,(joinpath(base, "mingw", "include"), C_System))
push!(headers,(joinpath(base, "mingw", "include", "c++", "7.1.0"), C_System))
push!(headers,(joinpath(base, "mingw", "include", "c++", "7.1.0", "x86_64-w64-mingw32"), C_System))
push!(headers,(joinpath(base, "mingw", "sys-root", "include"), C_System)) # not sure whether this is necessary
end #function addStdHeaders(C)
end # iswindows

Expand Down

0 comments on commit 9061ae0

Please sign in to comment.