2023-07-18 14:31:35 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null
|
2023-07-19 15:14:18 -05:00
|
|
|
set -e -x
|
2023-07-18 14:31:35 -05:00
|
|
|
|
2023-07-18 20:39:40 -05:00
|
|
|
# TODO: Sanitize host filesystem paths. https://github.com/rust-lang/cargo/issues/12137
|
|
|
|
|
2023-07-18 14:31:35 -05:00
|
|
|
cargo +nightly build \
|
2023-07-19 15:14:18 -05:00
|
|
|
--manifest-path bin/Cargo.toml \
|
2023-07-18 14:31:35 -05:00
|
|
|
--bin serde_derive \
|
|
|
|
--profile precompiled \
|
|
|
|
-Z unstable-options \
|
|
|
|
-Z build-std=std,panic_abort \
|
|
|
|
-Z build-std-features=panic_immediate_abort \
|
|
|
|
--target x86_64-unknown-linux-musl \
|
2023-07-19 15:14:18 -05:00
|
|
|
--out-dir serde_derive
|
2023-07-18 14:31:35 -05:00
|
|
|
|
2023-07-19 15:14:18 -05:00
|
|
|
rm -f serde_derive/serde_derive-x86_64-unknown-linux-gnu
|
|
|
|
mv serde_derive/serde_derive{,-x86_64-unknown-linux-gnu}
|
|
|
|
|
|
|
|
#upx --best --lzma serde_derive/serde_derive-x86_64-unknown-linux-gnu
|