Skip to content

Commit

Permalink
some documentation about building/using the static libs
Browse files Browse the repository at this point in the history
  • Loading branch information
cdetrio authored and axic committed May 2, 2019
1 parent 2be9c74 commit 3e01d99
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions scripts/static-build-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

#git clone --single-branch --branch benchmarking-static-lib https://github.com/ewasm/hera
# cd hera
# git submodule update --init

mkdir -p build
cd build
cmake -DBUILD_SHARED_LIBS=OFF -DHERA_BINARYEN=ON -DHERA_WABT=ON -DHERA_WAVM=ON -DHERA_DEBUGGING=OFF ..
cmake --build .

cd deps/src/binaryen-build/lib/
for f in *.a; do ar x $f; done
ar r -s -c libbinaryenfull.a *.o
rm *.o
cd ../../../../


cd deps/src/wavm-build/lib
for f in *.a; do ar x $f; done
ar r -s -c libwavm.a *.o
rm *.o
cd ../../../../

# apt-get install llvm-6.0-dev
# llvm .so file is needed for libwavm.a to be usable

# some flags might be unnecessary
#cgo LDFLAGS: /root/hera/build/src/libhera.a -L/root/hera/build/src/ -lhera -L/root/hera/build/deps/src/wabt-build/ -lwabt /root/hera/build/deps/src/binaryen-build/lib/libbinaryenfull.a /root/hera/build/deps/src/wavm-build/lib/libwavm.a -L/usr/lib/llvm-6.0/build/lib/ -lLLVM -rdynamic -lstdc++ -Wl,-unresolved-symbols=ignore-all

0 comments on commit 3e01d99

Please sign in to comment.