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

libcxxwrap_julia: switch to libjulia #1948

Merged
merged 1 commit into from
Nov 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 25 additions & 15 deletions L/libcxxwrap_julia/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,49 @@
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

julia_version = v"1.3.1"

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

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,8 +54,8 @@ 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.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"7")
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; preferred_gcc_version = v"7", julia_compat = "~$(julia_version.major).$(julia_version.minor)")