diff --git a/F/FastJet_Julia_Wrapper/build_tarballs.jl b/F/FastJet_Julia_Wrapper/build_tarballs.jl index 2ad67cdfb0f..6b052c2c4d1 100644 --- a/F/FastJet_Julia_Wrapper/build_tarballs.jl +++ b/F/FastJet_Julia_Wrapper/build_tarballs.jl @@ -25,9 +25,9 @@ install_license $WORKSPACE/srcdir/FastJet_Julia_Wrapper/LICENSE.md # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = expand_cxxstring_abis(supported_platforms()) -# skip i686 musl builds (not supported by libjulia_jll) -filter!(p -> !(Sys.islinux(p) && libc(p) == "musl" && arch(p) == "i686"), platforms) +include("../../L/libjulia/common.jl") +platforms = expand_cxxstring_abis(libjulia_platforms(julia_version)) + # the plugins aren't found on win. Disable for now, but this is not a fundamental limitation. filter!(!Sys.iswindows, platforms) diff --git a/L/LCIO_Julia_Wrapper/build_tarballs.jl b/L/LCIO_Julia_Wrapper/build_tarballs.jl index ca7aed54334..84d4d11e2a5 100644 --- a/L/LCIO_Julia_Wrapper/build_tarballs.jl +++ b/L/LCIO_Julia_Wrapper/build_tarballs.jl @@ -24,12 +24,11 @@ install_license $WORKSPACE/srcdir/LCIO_Julia_Wrapper/LICENSE # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -platforms = supported_platforms() +include("../../L/libjulia/common.jl") +platforms = libjulia_platforms(julia_version) filter!(!Sys.isfreebsd, platforms) filter!(!Sys.iswindows, platforms) filter!(p -> arch(p) != "armv7l", platforms) -# skip i686 musl builds (not supported by libjulia_jll) -filter!(p -> !(Sys.islinux(p) && libc(p) == "musl" && arch(p) == "i686"), platforms) platforms = expand_cxxstring_abis(platforms) diff --git a/L/Libtask/build_tarballs.jl b/L/Libtask/build_tarballs.jl index 8176396b286..eaa78c2b3bc 100644 --- a/L/Libtask/build_tarballs.jl +++ b/L/Libtask/build_tarballs.jl @@ -43,15 +43,8 @@ install_license LICENSE.md # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -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 +include("../../L/libjulia/common.jl") +platforms = libjulia_platforms(julia_version) # The products that we will ensure are always built products = [ diff --git a/L/libcxxwrap_julia/build_tarballs.jl b/L/libcxxwrap_julia/build_tarballs.jl index 3cc3c1e0246..c0aed940e33 100644 --- a/L/libcxxwrap_julia/build_tarballs.jl +++ b/L/libcxxwrap_julia/build_tarballs.jl @@ -34,16 +34,8 @@ 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 = 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 - +include("../../L/libjulia/common.jl") +platforms = libjulia_platforms(julia_version) platforms = expand_cxxstring_abis(platforms) # The products that we will ensure are always built diff --git a/L/libjulia/common.jl b/L/libjulia/common.jl index 1c04815ee8a..a81470a7098 100644 --- a/L/libjulia/common.jl +++ b/L/libjulia/common.jl @@ -1,6 +1,22 @@ # Note that this script can accept some limited command-line arguments, run # `julia build_tarballs.jl --help` to see a usage message. -using BinaryBuilder, Pkg.Types +using BinaryBuilder, Pkg + +# return the platforms supported by libjulia +function libjulia_platforms(julia_version) + platforms = supported_platforms() + + # skip 32bit musl builds; they fail with this error: + # libunwind.so.8: undefined reference to `setcontext' + filter!(p -> !(Sys.islinux(p) && libc(p) == "musl" && arch(p) == "i686"), platforms) + + # in Julia <= 1.3 skip PowerPC builds (see https://github.com/JuliaPackaging/Yggdrasil/pull/1795) + if julia_version < v"1.4" + filter!(p -> !(Sys.islinux(p) && arch(p) == "powerpc64le"), platforms) + end + + return platforms +end # Collection of sources required to build Julia function build_julia(version) @@ -196,16 +212,7 @@ function build_julia(version) # These are the platforms we will build for by default, unless further # platforms are passed in on the command line - platforms = supported_platforms() - - # skip 32bit musl builds; they fail with this error: - # libunwind.so.8: undefined reference to `setcontext' - filter!(p -> !(Sys.islinux(p) && libc(p) == "musl" && arch(p) == "i686"), platforms) - - # in Julia <= 1.3 skip PowerPC builds (see https://github.com/JuliaPackaging/Yggdrasil/pull/1795) - if version < v"1.4" - filter!(p -> !(Sys.islinux(p) && arch(p) == "powerpc64le"), platforms) - end + platforms = libjulia_platforms(version) # While the "official" Julia kernel ABI itself does not involve any C++ # symbols on the linker level, `libjulia` still exports "unofficial" symbols diff --git a/L/libsingular_julia/common.jl b/L/libsingular_julia/common.jl index 7f184243307..8742eb6fe15 100644 --- a/L/libsingular_julia/common.jl +++ b/L/libsingular_julia/common.jl @@ -31,16 +31,8 @@ install_license LICENSE.md # These are the platforms we will build for by default, unless further # platforms are passed in on the command line -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 - +include("../../L/libjulia/common.jl") +platforms = libjulia_platforms(julia_version) platforms = filter!(!Sys.iswindows, platforms) # Singular does not support Windows platforms = expand_cxxstring_abis(platforms)