mirror of
https://gitlab.com/signald/libraries/libsignal-client.git
synced 2024-12-04 19:46:37 +00:00
add script to select rust flags per target
This commit is contained in:
parent
ebbdb88922
commit
4493010e5e
2 changed files with 9 additions and 1 deletions
|
@ -32,7 +32,7 @@ compile:
|
|||
- git clone https://github.com/signalapp/libsignal-client
|
||||
- cd libsignal-client && git checkout "$libsignal_version"
|
||||
- rustup target add "${TARGET}"
|
||||
- RUSTFLAGS='-C link-arg=-s' cargo build -p libsignal-jni --target "${TARGET}" --release --verbose
|
||||
- RUSTFLAGS="$(./rustflags.sh)" cargo build -p libsignal-jni --target "${TARGET}" --release --verbose
|
||||
- cp -v target/${TARGET}/release/libsignal_jni.so ../libsignal_jni-${TARGET}.so
|
||||
artifacts:
|
||||
paths:
|
||||
|
|
8
rustflags.sh
Executable file
8
rustflags.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
flags="-C link-arg=-s"
|
||||
|
||||
if [[ "${TARGET}" == *musl ]]; then
|
||||
flags="${flags} -C target-feature=-crt-static"
|
||||
fi
|
||||
|
||||
echo "${flags}"
|
Loading…
Reference in a new issue