File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
+ set -euo pipefail -x
2
3
3
- wget https://github.com/bytecodealliance/wasmtime/releases/download/v0.30.0/wasmtime-v0.30.0-x86_64-linux-c-api.tar.xz
4
- tar -xvf ./wasmtime-v0.30.0-x86_64-linux-c-api.tar.xz
5
- mv wasmtime-v0.30.0-x86_64-linux-c-api wasmtime-c-api
4
+ VER=v0.30.0
5
+ wget https://github.com/bytecodealliance/wasmtime/releases/download/${VER} /wasmtime-${VER} -x86_64-linux-c-api.tar.xz
6
+ tar -xvf ./wasmtime-${VER} -x86_64-linux-c-api.tar.xz > /dev/null
7
+ if echo " int main(void) {}" | gcc -o /dev/null -v -x c - & > /dev/stdout| grep collect | tr -s " " " \012" | grep musl; then
8
+ # build from source code if the libc is musl
9
+ git clone
[email protected] :bytecodealliance/wasmtime -b
${VER} \
10
+ && cd wasmtime \
11
+ && git submodule update --init \
12
+ && cargo build --release --manifest-path crates/c-api/Cargo.toml
13
+ fi
14
+ mv wasmtime-${VER} -x86_64-linux-c-api wasmtime-c-api
You can’t perform that action at this time.
0 commit comments