Skip to content

Commit

Permalink
libcxxwrap_julia: switch to libjulia
Browse files Browse the repository at this point in the history
Also drop the restriction to the cxx11 ABI and add more platforms.

Co-authored-by: Bart Janssens <bart@bartjanssens.org>
Co-authored-by: Benjamin Lorenz <benlorenz@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 31, 2020
1 parent fbcd243 commit 63045eb
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions L/libcxxwrap_julia/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,47 @@
using BinaryBuilder, Pkg

name = "libcxxwrap_julia"
version = v"0.8.0"
version = v"0.8.2"
julia_version = v"1.3.1"

const is_yggdrasil = haskey(ENV, "BUILD_BUILDNUMBER")
git_repo = is_yggdrasil ? "https://github.com/JuliaInterop/libcxxwrap-julia.git" : joinpath(ENV["HOME"], "src/julia/libcxxwrap-julia/")
unpack_target = is_yggdrasil ? "" : "libcxxwrap-julia"

# Collection of sources required to complete build
sources = [
GitSource(git_repo, "30997d732f6a317348a05b4ccb777dfbcc483525", unpack_target=unpack_target),
GitSource(git_repo, "2bba0c81ea00d58d3321540a0526098aa9eb3c8b", unpack_target=unpack_target),
]

# Bash recipe for building across all platforms
script = raw"""
mkdir build
cd build
cmake -DJulia_PREFIX=$prefix -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_FIND_ROOT_PATH=$prefix -DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} -DCMAKE_BUILD_TYPE=Release ../libcxxwrap-julia/
cmake \
-DJulia_PREFIX=$prefix \
-DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_FIND_ROOT_PATH=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
../libcxxwrap-julia/
VERBOSE=ON cmake --build . --config Release --target install -- -j${nproc}
install_license $WORKSPACE/srcdir/libcxxwrap-julia*/LICENSE.md
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("x86_64", "freebsd"; cxxstring_abi = "cxx11"),
Platform("armv7l", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("aarch64", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("x86_64", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("i686", "linux"; libc="glibc", cxxstring_abi = "cxx11"),
Platform("x86_64", "macos"; cxxstring_abi = "cxx11"),
Platform("x86_64", "windows"; cxxstring_abi = "cxx11"),
Platform("i686", "windows"; cxxstring_abi = "cxx11"),
]
platforms = supported_platforms()

# skip i686 musl builds (not supported by libjulia_jll)
filter!(p -> !(Sys.islinux(p) && libc(p) == "musl" && arch(p) == "i686"), platforms)

# skip PowerPC builds in Julia 1.3 (not supported by libjulia_jll)
if julia_version < v"1.4"
filter!(p -> !(Sys.islinux(p) && arch(p) == "powerpc64le"), platforms)
end

platforms = expand_cxxstring_abis(platforms)

# The products that we will ensure are always built
products = [
Expand All @@ -44,7 +53,7 @@ products = [

# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency(PackageSpec(name="Julia_jll",version=v"1.4.1"))
BuildDependency(PackageSpec(name="libjulia_jll", version=julia_version))
]

# Build the tarballs, and possibly a `build.jl` as well.
Expand Down

0 comments on commit 63045eb

Please sign in to comment.