mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-02 05:32:16 +00:00
* Bins off 515 * Please work? * Remove all beta as well * Hmmmm * CURL 4 * AAAAAAAAAAAAAAAAAAAAAAAAAAA * SDMM PLEASEEEEEEEEEEEEEEEEEEE * GAH * I am so rusty - thats not a pun * Build Rust library * guh --------- Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
38 lines
1.3 KiB
Bash
Executable File
38 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Make is fail early if theres a problem
|
|
set -euo pipefail
|
|
|
|
# Get to our folder first
|
|
cd rust
|
|
|
|
WINDOWS_TARGET="i686-pc-windows-gnu"
|
|
LINUX_TARGET="i686-unknown-linux-gnu"
|
|
|
|
# Handle building on windows
|
|
if [[ "$OSTYPE" == "msys" ]]; then
|
|
WINDOWS_TARGET="i686-pc-windows-msvc"
|
|
fi
|
|
|
|
# Build it for CI
|
|
cargo build --release --target $LINUX_TARGET
|
|
cp target/$LINUX_TARGET/release/librustlibs.so ../tools/ci/librustlibs_ci.so
|
|
#cargo clean
|
|
#cargo build --release --target $LINUX_TARGET --no-default-features --features byond-516
|
|
#cp target/$LINUX_TARGET/release/librustlibs.so ../tools/ci/librustlibs_ci_516.so
|
|
|
|
# Build it for Windows
|
|
cargo build --release --target $WINDOWS_TARGET
|
|
cp target/$WINDOWS_TARGET/release/rustlibs.dll ../rustlibs.dll
|
|
#cargo clean
|
|
#cargo build --release --target $WINDOWS_TARGET --no-default-features --features byond-516
|
|
#cp target/$WINDOWS_TARGET/release/rustlibs.dll ../rustlibs_516.dll
|
|
|
|
# Build the para-specific version
|
|
export RUSTFLAGS='-C target-cpu=znver5'
|
|
cargo build --release --target=$WINDOWS_TARGET
|
|
cp target/$WINDOWS_TARGET/release/rustlibs.dll ../rustlibs_prod.dll
|
|
#cargo clean
|
|
#cargo build --release --target=$WINDOWS_TARGET --no-default-features --features byond-516
|
|
#cp target/$WINDOWS_TARGET/release/rustlibs.dll ../rustlibs_516_prod.dll
|