Skip to content

Instantly share code, notes, and snippets.

@marcelbuesing
Created November 21, 2017 15:27
Show Gist options
  • Save marcelbuesing/3e60d552407dd09d0b30330e9089ee22 to your computer and use it in GitHub Desktop.
Save marcelbuesing/3e60d552407dd09d0b30330e9089ee22 to your computer and use it in GitHub Desktop.
Nightly rust cargo cross compile with openssl
build-nightly:
image: rustlang/rust:nightly
before_script:
- dpkg --add-architecture armhf
- apt-get update && apt-get install --no-install-recommends -y gcc-arm-linux-gnueabihf libc6-armhf-cross libc6-dev-armhf-cross libssl-dev:armhf
# Install OpenSSL
- export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
- export OPENSSL_INCLUDE_DIR=/usr/include/openssl/
- export OPENSSL_LIB_DIR=/usr/lib/arm-linux-gnueabihf/
# Rustup configuration
- rustup target add armv7-unknown-linux-gnueabihf
- rustup default nightly
- rustc --version
script:
- cargo build --target=armv7-unknown-linux-gnueabihf --release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment