Skip to content
Open
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
28 changes: 19 additions & 9 deletions F/finufft/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ using BinaryBuilderBase

const YGGDRASIL_DIR = "../.."
include(joinpath(YGGDRASIL_DIR, "platforms", "microarchitectures.jl"))
include(joinpath(YGGDRASIL_DIR, "platforms", "macos_sdks.jl"))

name = "finufft"
version = v"2.4.1"
commit_hash = "e7144a5c08cbaf3e3b344a4fdd92bc3c7e468ff2" # v2.4.1
version = v"2.5.0"
commit_hash = "8b7ac66e617ea317cd42366ac27c536793131696"
preferred_gcc_version=v"10"

# Collection of sources required to complete build
sources = [
Expand All @@ -18,6 +20,7 @@ sources = [
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/finufft*/
apk del cmake

mkdir build && cd build
cmake .. \
Expand All @@ -32,15 +35,19 @@ cmake --build . --parallel $nproc
cmake --install .
"""

# Need macOS SDK >= 10.14
sources, script = require_macos_sdk("10.14", sources, script)

platforms = supported_platforms()
# xsimd library does not work with armv6, armv7, powerpc
filter!(p -> !(contains(arch(p), "armv") || contains(arch(p), "powerpc")), platforms)
# riscv64 does not build, remove for now

# Remove platforms that do not currently build: armv6, armv7, riscv64
filter!(p -> !(contains(arch(p), "armv")), platforms)
filter!(p -> !(contains(arch(p), "riscv64")), platforms)
# FreeBSD aarch64 does not build, remove for now
filter!(p -> !(p["os"]=="freebsd" && p["arch"]=="aarch64"), platforms)

# ABI expansion
platforms = expand_cxxstring_abis(platforms; skip=!Sys.iswindows)
# Expand for microarchitectures on x86_64 (library doesn't have CPU dispatching)
platforms = expand_cxxstring_abis(expand_microarchitectures(platforms, ["x86_64", "avx", "avx2", "avx512"]); skip=!Sys.iswindows)
platforms = expand_microarchitectures(platforms, ["x86_64", "avx", "avx2", "avx512"])

augment_platform_block = """
$(MicroArchitectures.augment)
Expand All @@ -67,9 +74,12 @@ dependencies = [
# systems), and libgomp from `CompilerSupportLibraries_jll` everywhere else.
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"); platforms=filter(!Sys.isbsd, platforms)),
Dependency(PackageSpec(name="LLVMOpenMP_jll", uuid="1d63c593-3942-5779-bab2-d838dc0a180e"); platforms=filter(Sys.isbsd, platforms)),
# CMake needs higher version than what is bundled.
HostBuildDependency(PackageSpec(; name="CMake_jll", version = v"3.24.3+0")),

]

llvm_version = v"13.0.1+1"
# Build the tarballs, and possibly a `build.jl` as well.
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
preferred_gcc_version=v"10", preferred_llvm_version=llvm_version, julia_compat="1.6", augment_platform_block)
preferred_gcc_version=preferred_gcc_version, preferred_llvm_version=llvm_version, julia_compat="1.6", augment_platform_block)