-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·65 lines (49 loc) · 1.09 KB
/
build.sh
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
60
61
62
63
64
#!/usr/bin/env bash
set -eux
unset CDPATH
root="$(pwd)"
cargo build --workspace --release
mkdir -p build
pushd build
if [ ! -d ruby ]; then
git clone git@github.com:ruby/ruby.git ruby
fi
pushd ruby
git checkout -- .
git clean -fd
git checkout v2_6_3
popd
mkdir -p rubies
mkdir -p rubies/2.6.3-st_hash
mkdir -p rubies/2.6.3-strudel
if [ ! -d ruby-strudel-build-root ]; then
cp -r ruby ruby-strudel-build-root
pushd ruby-strudel-build-root
git apply "${root}/strudelify-mri.patch"
git add .
git commit -m "strudel hash map backend"
aclocal
autoconf
export cflags="-DSTRUDEL"
export LDFLAGS="-L${root}/target/release/"
export LIBS="-lstrudel_st"
./configure --prefix="${root}/build/rubies/2.6.3-strudel" --with-baseruby="$(which ruby)"
unset cflags
unset LDFLAGS
unset LIBS
popd
fi
pushd ruby-strudel-build-root
make miniruby
# make
# make install
popd
if [ ! -d ruby-st_hash-build-root ]; then
cp -r ruby ruby-st_hash-build-root
pushd ruby-st_hash-build-root
autoconf
./configure --prefix="${root}/build/rubies/2.6.3-st_hash"
make
make install
popd
fi