-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sh
executable file
·23 lines (18 loc) · 954 Bytes
/
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
#!/bin/sh
set -e
mkdir -p build
echo "building double-conversion dependency"
cd ryu/third_party/double-conversion
mkdir -p build-ryu
cd build-ryu
cmake .. -DCMAKE_BUILD_TYPE=Release > /dev/null
make -j4 > /dev/null
cp double-conversion/libdouble-conversion.a ../../../../build
cd ../../../..
echo "building reference benchmark"
g++ -std=c++11 -O2 -Iryu ryu/ryu/*.c ryu/ryu/benchmark/benchmark.cc build/libdouble-conversion.a -o bench-reference
g++ -std=c++11 -O2 -Iryu ryu/ryu/*.c ryu/ryu/benchmark/benchmark_fixed.cc build/libdouble-conversion.a -o bench-reference-fixed
echo "building zig benchmark"
zig build-obj src/ryu_c.zig --release-fast --output-dir build --name ryu.zig --cache-dir build --library c
g++ -std=c++11 -O2 -Iryu build/ryu.zig.o ryu/ryu/benchmark/benchmark.cc build/libdouble-conversion.a -o bench-zig
g++ -std=c++11 -O2 -Iryu build/ryu.zig.o ryu/ryu/benchmark/benchmark_fixed.cc build/libdouble-conversion.a -o bench-zig-fixed