]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #71804 - petrochenkov:static-pie, r=cuviper
authorRalf Jung <post@ralfj.de>
Fri, 29 May 2020 19:58:24 +0000 (21:58 +0200)
committerGitHub <noreply@github.com>
Fri, 29 May 2020 19:58:24 +0000 (21:58 +0200)
commit7aef3a0f6f8c86cc90b4a6b209b7167d2ac34e12
treeb34777f56cd32709880200dd6833c70394606db1
parent1cfe0e9c635c41309ec852c5f296f7e77fec6940
parent96a466c3128945627c2f81ec13b8ae98be7c3749
Rollup merge of #71804 - petrochenkov:static-pie, r=cuviper

linker: Support `-static-pie` and `-static -shared`

This PR adds support for passing linker arguments for creating statically linked position-independent executables and "statically linked" shared libraries.

Therefore it incorporates the majority of https://github.com/rust-lang/rust/pull/70740 except for the linker rerun hack and actually flipping the "`static-pie` is supported" switch for musl targets.
src/librustc_codegen_ssa/back/link.rs
src/librustc_codegen_ssa/back/linker.rs
src/librustc_target/spec/mod.rs