Mercurial > vanilla
changeset 1201:6af48cb79e02
lang/rust: disable static by default
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 07 Nov 2019 09:07:50 +0100 |
parents | 69de1636434b |
children | 5234b208c7f1 |
files | lang/rust/patch-clang.patch |
diffstat | 1 files changed, 14 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lang/rust/patch-clang.patch Thu Nov 07 09:06:38 2019 +0100 +++ b/lang/rust/patch-clang.patch Thu Nov 07 09:07:50 2019 +0100 @@ -1,13 +1,3 @@ ---- src/librustc_target/spec/linux_musl_base.rs.orig 2019-10-15 14:51:21.989949084 +0200 -+++ src/librustc_target/spec/linux_musl_base.rs 2019-10-15 14:51:42.253949707 +0200 -@@ -24,6 +24,7 @@ - base.pre_link_objects_exe_crt.push("crt1.o".to_string()); - base.pre_link_objects_exe_crt.push("crti.o".to_string()); - base.post_link_objects_crt.push("crtn.o".to_string()); -+ base.post_link_objects_crt.push("-lunwind".to_string()); - - // These targets statically link libc by default - base.crt_static_default = true; --- src/libunwind/lib.rs.orig 2019-10-15 14:54:58.457955734 +0200 +++ src/libunwind/lib.rs 2019-10-15 14:55:28.705956663 +0200 @@ -23,6 +23,5 @@ @@ -18,3 +8,17 @@ -#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))] +#[link(name = "unwind")] extern {} +--- src/librustc_target/spec/linux_musl_base.rs.orig 2019-09-23 21:15:52.000000000 +0000 ++++ src/librustc_target/spec/linux_musl_base.rs 2019-10-31 13:19:59.189184637 +0000 +@@ -24,9 +24,10 @@ + base.pre_link_objects_exe_crt.push("crt1.o".to_string()); + base.pre_link_objects_exe_crt.push("crti.o".to_string()); + base.post_link_objects_crt.push("crtn.o".to_string()); ++ base.post_link_objects_crt.push("-lunwind".to_string()); + + // These targets statically link libc by default +- base.crt_static_default = true; ++ base.crt_static_default = false; + // These targets allow the user to choose between static and dynamic linking. + base.crt_static_respected = true; +