-
Notifications
You must be signed in to change notification settings - Fork 568
/
Copy pathbuild_tarballs.jl
52 lines (42 loc) · 1.73 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
using BinaryBuilder
name = "LibUV"
version = v"2"
# Collection of sources required to build libuv
sources = [
GitSource("https://github.com/JuliaLang/libuv.git",
"654853c2a70e03acf1ff9dcac09c498a257d292a"),
]
# Bash recipe for building across all platforms
script = raw"""
cd $WORKSPACE/srcdir/libuv/
# Touch some files so that the build system doesn't attempt to re-run `autoconf`:
touch -c aclocal.m4
touch -c Makefile.in
touch -c configure
if [[ ${bb_full_target} == *-sanitize+memory* ]]; then
# Install msan runtime (for clang)
cp -rL ${libdir}/linux/* /opt/x86_64-linux-musl/lib/clang/*/lib/linux/
fi
# `--with-pic` isn't enough; we really really need -fPIC and -DPIC everywhere...
# everywhere, especially on FreeBSD. In the end, isn't FreeBSD all that matters?
./configure --prefix=${prefix} --build=${MACHTYPE} --host=${target} --with-pic CFLAGS="${CFLAGS} -DPIC -fPIC" CXXFLAGS="${CXXFLAGS} -DPIC -fPIC"
make -j${nproc} V=1
make install
"""
# We enable experimental platforms as this is a core Julia dependency
platforms = supported_platforms(;experimental=true)
push!(platforms, Platform("x86_64", "linux"; sanitize="memory"))
# The products that we will ensure are always built
products = [
LibraryProduct("libuv", :libuv),
]
# Dependencies that must be installed before this package can be built
dependencies = [
BuildDependency("LLVMCompilerRT_jll"; platforms=[Platform("x86_64", "linux"; sanitize="memory")]),
]
# Note: we explicitly lie about this because we don't have the new
# versioning APIs worked out in BB yet.
version = v"2.0.1"
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies;
# We need GCC 4.9+ for stdatomic.h
julia_compat="1.6", preferred_gcc_version=v"5")