diff --git a/Cargo.toml b/Cargo.toml index d5aec47..8c24899 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,18 @@ termion = "1.5" serde = {version = "1.0", features = ["derive"]} confy = "0.4.0" +#[target.arm-linux-linux-muxl] +#linker = "arm-linux-unknown-gcc" + +[target.aarch64-linux-musl] +linker = "aarch64-linux-gnu-gcc" + +[target.aarch64-unknown-linux-musl] +linker = "aarch64-linux-gnu-gcc" + +[target.aarch64-unknown-linux-gcc] +linker = "aarch64-linux-gnu-gcc" + # TODO: cross compilation # [target.arm-unknown-linux-gnueabihf] # linker = "arm-linux-gnueabihf-gcc" diff --git a/build.earth b/build.earth index 0dee76d..65139eb 100644 --- a/build.earth +++ b/build.earth @@ -2,7 +2,7 @@ FROM rust:latest ENV CARGO_HOME=/deps WORKDIR /work RUN apt-get update -RUN apt-get install -y gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu +RUN apt-get install -y gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu gdb-mingw-w64 gcc-mingw-w64-x86-64 deps: COPY ./Cargo.toml ./Cargo.lock . @@ -20,11 +20,14 @@ build: COPY ./src/ ./src/ RUN cargo build --release --target "$TOOLCHAIN" RUN strip "target/$TOOLCHAIN/release/rpn_rs" - SAVE ARTIFACT target/$TOOLCHAIN/release/rpn_rs AS LOCAL target/$TOOLCHAIN/release/rpn_rs + RUN xz --keep "target/$TOOLCHAIN/release/rpn_rs" + SAVE ARTIFACT target/$TOOLCHAIN/release/rpn_rs AS LOCAL target/$TOOLCHAIN/release/rpn_rs-$TOOLCHAIN + SAVE ARTIFACT target/$TOOLCHAIN/release/rpn_rs.xz AS LOCAL target/$TOOLCHAIN/release/rpn_rs-$TOOLCHAIN.xz all: BUILD --build-arg TOOLCHAIN=x86_64-unknown-linux-musl +build BUILD --build-arg TOOLCHAIN=i686-unknown-linux-musl +build + # BUILD --build-arg TOOLCHAIN=x86_64-pc-windows-gnu +build # TODO: Cross compile # BUILD --build-arg TOOLCHAIN=aarch64-unknown-linux-musl +build # BUILD --build-arg TOOLCHAIN=arm-unknown-linux-musleabi +build