diff options
| author | Tyler Mandry <tmandry@gmail.com> | 2020-09-01 18:24:36 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-01 18:24:36 -0700 |
| commit | 4a6aa350c71859759cff6785b1e64ed348362a7d (patch) | |
| tree | 047864dfc6f803dbc5c217f0aeda63710c175ab9 /compiler/rustc_codegen_ssa/src/back | |
| parent | b01d0b141431665a39637b35cefb336583e4446a (diff) | |
| parent | 23f0ccfe5d9999a54dfcc4f5ba953981ba092aa7 (diff) | |
| download | rust-4a6aa350c71859759cff6785b1e64ed348362a7d.tar.gz rust-4a6aa350c71859759cff6785b1e64ed348362a7d.zip | |
Rollup merge of #76158 - mati865:self-contained-option, r=petrochenkov
Stabilise link-self-contained option MCP has been accepted: https://github.com/rust-lang/compiler-team/issues/343 I'll add improved heuristic in next PR.
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/back')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 270c8250e19..8262ae4cdbb 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -1084,7 +1084,7 @@ fn get_crt_libs_path(sess: &Session) -> Option<PathBuf> { fn get_object_file_path(sess: &Session, name: &str, self_contained: bool) -> PathBuf { // prefer system {,dll}crt2.o libs, see get_crt_libs_path comment for more details - if sess.opts.debugging_opts.link_self_contained.is_none() + if sess.opts.cg.link_self_contained.is_none() && sess.target.target.llvm_target.contains("windows-gnu") { if let Some(compiler_libs_path) = get_crt_libs_path(sess) { @@ -1289,7 +1289,7 @@ fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { /// Whether we link to our own CRT objects instead of relying on gcc to pull them. /// We only provide such support for a very limited number of targets. fn crt_objects_fallback(sess: &Session, crate_type: CrateType) -> bool { - if let Some(self_contained) = sess.opts.debugging_opts.link_self_contained { + if let Some(self_contained) = sess.opts.cg.link_self_contained { return self_contained; } @@ -1499,7 +1499,7 @@ fn link_local_crate_native_libs_and_dependent_crate_libs<'a, B: ArchiveBuilder<' /// Add sysroot and other globally set directories to the directory search list. fn add_library_search_dirs(cmd: &mut dyn Linker, sess: &Session, self_contained: bool) { // Prefer system mingw-w64 libs, see get_crt_libs_path comment for more details. - if sess.opts.debugging_opts.link_self_contained.is_none() + if sess.opts.cg.link_self_contained.is_none() && cfg!(windows) && sess.target.target.llvm_target.contains("windows-gnu") { |
