Skip to content

Commit e75c254

Browse files
committed
add first BB script
1 parent f20b35a commit e75c254

File tree

4 files changed

+49
-0
lines changed

4 files changed

+49
-0
lines changed

contrib/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
products/

contrib/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[deps]
2+
BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
3+
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"

contrib/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Shipping a Julia-compatible Enzyme library
2+
Since Julia has LLVM as a core dependency and uses a heavily patched version
3+
we want to ship enzyme build against the same LLVM version in a way that is compatible
4+
ABI compatible with the LLVM version used by Julia.
5+
6+
## Instructions
7+
8+
```
9+
julia --project=. build_tarballs.jl --debug x86_64-linux-gnu
10+
```

contrib/build_tarballs.jl

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using BinaryBuilder
2+
3+
sources = [
4+
"../enzyme"
5+
]
6+
7+
script = raw"""
8+
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$prefix -DCMAKE_TOOLCHAIN_FILE=/opt/$target/$target.toolchain \
9+
-DLLVM_DIR=/workspace/destdir/lib/cmake/llvm
10+
ninja install
11+
"""
12+
13+
products(prefix) = [
14+
LibraryProduct(prefix, "LLVMEnzym", :libenzyme),
15+
]
16+
17+
dependencies = [
18+
"https://github.com/staticfloat/LLVMBuilder/releases/download/v6.0.1-7%2Bnowasm/build_LLVM.v6.0.1.jl"
19+
]
20+
21+
# By default, we build for all platforms.
22+
platforms = supported_platforms()
23+
24+
# Build 'em!
25+
build_tarballs(
26+
ARGS,
27+
"enzyme",
28+
v"0.0.1",
29+
sources,
30+
script,
31+
platforms,
32+
products,
33+
dependencies,
34+
)

0 commit comments

Comments
 (0)