From 3b2c2faa1fbc4bb51fa1dc34f71fea155f5f0664 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Thu, 13 Apr 2017 14:55:55 +0200 Subject: testing/rust: build dynamically linked binaries by default Note that users still can switch to static linking using `-C target-feature=+crt-static`, that is allowed in our rustc. --- testing/rust/allow-crt-static-on-stable.patch | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'testing/rust/allow-crt-static-on-stable.patch') diff --git a/testing/rust/allow-crt-static-on-stable.patch b/testing/rust/allow-crt-static-on-stable.patch index df4c06bf79..5e81671f60 100644 --- a/testing/rust/allow-crt-static-on-stable.patch +++ b/testing/rust/allow-crt-static-on-stable.patch @@ -3,17 +3,17 @@ Date: Sat, 08 Aug 2016 14:49:00 +0200 Subject: [PATCH] Allow to use -C target-feature=+crt-static on stable rustc Rust links system libraries statically on musl by default, but we want to -link dynamically. At the same time we would like to preserve this behaviour -for consistency with other distros, to not confuse users. +link dynamically. At the same time we want to allow users to optionally +use static linking. rustc already provides codegen option to change linking, but currently it's allowed only for nightly builds. This patch just removes this check and so allows to use it even on stable build. -Build dynamically linked binary with rustc or cargo: +Build staticaly linked binary with rustc or cargo: - $ rustc -C target-feature=-crt-static hello_world.rs - $ RUSTFLAGS="-C target-feature=-crt-static" cargo build + $ rustc -C target-feature=+crt-static hello_world.rs + $ RUSTFLAGS="-C target-feature=+crt-static" cargo build --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs -- cgit v1.2.3