-
Notifications
You must be signed in to change notification settings - Fork 555
/
build_tarballs.jl
59 lines (48 loc) · 2.03 KB
/
build_tarballs.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# 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
include("../common.jl"); push!(sources, DirectorySource("./bundled"))
name = "oneAPI_Level_Zero_Loader"
# Bash recipe for building across all platforms
script = raw"""
cd level-zero
install_license LICENSE
if [[ "${target}" == *musl* ]]; then
atomic_patch -p1 $WORKSPACE/srcdir/patches/musl-no-deepbind.patch
fi
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=$prefix \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release ..
make -j${nproc}
make install
"""
# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
platforms = [
Platform("i686", "linux"; libc="glibc"),
Platform("x86_64", "linux"; libc="glibc"),
Platform("i686", "linux"; libc="musl"),
Platform("x86_64", "linux"; libc="musl"),
]
platforms = expand_cxxstring_abis(platforms)
# The products that we will ensure are always built
products = [
LibraryProduct("libze_loader", :libze_loader),
LibraryProduct("libze_validation_layer", :libze_validation_layer),
]
# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency("OpenCL_Headers_jll"),
# The oneAPI Level Zero loader expects an implementation of its spec to be available.
# That means we need to dlopen the implementation, e.g. Intel's NEO, before the loader!
# To make sure that implementation sits at the same API level of the loader, we have
# both packages depend on the oneAPI Level Zero Headers package.
#
# Users of these packages, e.g. oneAPI.jl, should only depend on the loader and an
# implementation, but will need to make sure to load one before the other.
Dependency("oneAPI_Level_Zero_Headers_jll"; compat="=$api_version"),
]
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
preferred_gcc_version=v"5")
# bump