forked from bytecodealliance/wasmtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1aba155
commit b93c3c9
Showing
3 changed files
with
62 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
# A small script used for assembling release tarballs for both the `wasmtime` | ||
# binary and the C API. This is executed with two arguments, mostly coming from | ||
# the CI matrix. | ||
# | ||
# * The first argument is the name of the platform, used to name the release | ||
# * The second argument is the "target", if present, currently only for | ||
# cross-compiles | ||
# | ||
# This expects the build to already be done and will assemble release artifacts | ||
# in `dist/` | ||
|
||
set -ex | ||
|
||
target=$1 | ||
min=$2 | ||
|
||
if [ "$min" == "true" ]; then | ||
export CARGO_PROFILE_RELEASE_STRIP=debuginfo | ||
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s | ||
export RUSTFLAGS=-Zlocation-detail=none | ||
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 | ||
export CARGO_PROFILE_RELEASE_LTO=true | ||
export CARGO_PROFILE_RELEASE_PANIC=abort | ||
flags="-Zbuild-std=std,panic_abort --no-default-features -Zbuild-std-features=" | ||
else | ||
bin_flags="--features all-arch,component-model" | ||
fi | ||
|
||
cargo build --release $flags --target $target -p wasmtime $bin_flags | ||
cargo build --release $flags --target $target -p wasmtime-c-api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters