diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 0e6887a508223331201cca2a0363240d99a312dd..533eb23c193e148a916ce8c29ac1d7344c812878 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -25,7 +25,6 @@ feature(integer_atomics, stdsimd) )] #![cfg_attr(any(unix, target_os = "cloudabi", target_os = "redox"), feature(libc))] -#![rustc_alloc_kind = "lib"] // The minimum alignment guaranteed by the architecture. This value is used to // add fast paths for low alignment values. diff --git a/src/librustc/middle/dependency_format.rs b/src/librustc/middle/dependency_format.rs index e3f9c51a1235ee934e046c90e09046d9689097d8..671f513d5b9331850caeb02550f4e08d06080785 100644 --- a/src/librustc/middle/dependency_format.rs +++ b/src/librustc/middle/dependency_format.rs @@ -63,7 +63,6 @@ use hir::def_id::CrateNum; -use session; use session::config; use ty::TyCtxt; use middle::cstore::{self, DepKind}; @@ -224,7 +223,6 @@ fn calculate_type<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, // quite yet, so do so here. activate_injected_dep(*sess.injected_panic_runtime.get(), &mut ret, &|cnum| tcx.is_panic_runtime(cnum)); - activate_injected_allocator(sess, &mut ret); // When dylib B links to dylib A, then when using B we must also link to A. // It could be the case, however, that the rlib for A is present (hence we @@ -303,7 +301,6 @@ fn attempt_static<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) -> Option, } } -fn activate_injected_allocator(sess: &session::Session, - list: &mut DependencyList) { - let cnum = match sess.injected_allocator.get() { - Some(cnum) => cnum, - None => return, - }; - let idx = cnum.as_usize() - 1; - if list[idx] == Linkage::NotLinked { - list[idx] = Linkage::Static; - } -} - // After the linkage for a crate has been determined we need to verify that // there's only going to be one allocator in the output. fn verify_ok<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, list: &[Linkage]) { diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index efd7e8b610efc787290e7b977c9e81b95f507951..8cfbd27fc61631f4096e6ed0ddd59322344223e6 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -112,7 +112,6 @@ pub struct Session { /// The metadata::creader module may inject an allocator/panic_runtime /// dependency if it didn't already find one, and this tracks what was /// injected. - pub injected_allocator: Once>, pub allocator_kind: Once>, pub injected_panic_runtime: Once>, @@ -1162,7 +1161,6 @@ pub fn build_session_( type_length_limit: Once::new(), const_eval_stack_frame_limit: 100, next_node_id: OneThread::new(Cell::new(NodeId::new(1))), - injected_allocator: Once::new(), allocator_kind: Once::new(), injected_panic_runtime: Once::new(), imported_macro_spans: OneThread::new(RefCell::new(FxHashMap::default())), diff --git a/src/librustc_metadata/creader.rs b/src/librustc_metadata/creader.rs index 7733ab2e246d1135fa3fac808b73ce98c0375852..734d84b409a9e5c1cabe8eb0880a98e81d80bccd 100644 --- a/src/librustc_metadata/creader.rs +++ b/src/librustc_metadata/creader.rs @@ -864,7 +864,6 @@ fn inject_allocator_crate(&mut self, krate: &ast::Crate) { needs_allocator = needs_allocator || data.root.needs_allocator; }); if !needs_allocator { - self.sess.injected_allocator.set(None); self.sess.allocator_kind.set(None); return } @@ -872,20 +871,18 @@ fn inject_allocator_crate(&mut self, krate: &ast::Crate) { // At this point we've determined that we need an allocator. Let's see // if our compilation session actually needs an allocator based on what // we're emitting. - let mut need_lib_alloc = false; - let mut need_exe_alloc = false; + let mut all_rlib = true; for ct in self.sess.crate_types.borrow().iter() { match *ct { - config::CrateType::Executable => need_exe_alloc = true, + config::CrateType::Executable | config::CrateType::Dylib | config::CrateType::ProcMacro | config::CrateType::Cdylib | - config::CrateType::Staticlib => need_lib_alloc = true, + config::CrateType::Staticlib => all_rlib = false, config::CrateType::Rlib => {} } } - if !need_lib_alloc && !need_exe_alloc { - self.sess.injected_allocator.set(None); + if all_rlib { self.sess.allocator_kind.set(None); return } @@ -924,103 +921,27 @@ fn inject_allocator_crate(&mut self, krate: &ast::Crate) { }); if global_allocator.is_some() { self.sess.allocator_kind.set(Some(AllocatorKind::Global)); - self.sess.injected_allocator.set(None); return } // Ok we haven't found a global allocator but we still need an - // allocator. At this point we'll either fall back to the "library - // allocator" or the "exe allocator" depending on a few variables. Let's - // figure out which one. - // - // Note that here we favor linking to the "library allocator" as much as - // possible. If we're not creating rustc's version of libstd - // (need_lib_alloc and prefer_dynamic) then we select `None`, and if the - // exe allocation crate doesn't exist for this target then we also - // select `None`. - let exe_allocation_crate_data = - if need_lib_alloc && !self.sess.opts.cg.prefer_dynamic { - None - } else { - self.sess - .target - .target - .options - .exe_allocation_crate - .as_ref() - .map(|name| { - // We've determined that we're injecting an "exe allocator" which means - // that we're going to load up a whole new crate. An example of this is - // that we're producing a normal binary on Linux which means we need to - // load the `alloc_jemalloc` crate to link as an allocator. - let name = Symbol::intern(name); - let (cnum, data) = self.resolve_crate(&None, - name, - name, - None, - None, - DUMMY_SP, - PathKind::Crate, - DepKind::Implicit) - .unwrap_or_else(|err| err.report()); - self.sess.injected_allocator.set(Some(cnum)); - data - }) - }; - - let allocation_crate_data = exe_allocation_crate_data.or_else(|| { - // No allocator was injected - self.sess.injected_allocator.set(None); - - if attr::contains_name(&krate.attrs, "default_lib_allocator") { - // Prefer self as the allocator if there's a collision - return None; + // allocator. At this point our allocator request is typically fulfilled + // by the standard library, denoted by the `#![default_lib_allocator]` + // attribute. + let mut has_default = attr::contains_name(&krate.attrs, "default_lib_allocator"); + self.cstore.iter_crate_data(|_, data| { + if data.root.has_default_lib_allocator { + has_default = true; } - // We're not actually going to inject an allocator, we're going to - // require that something in our crate graph is the default lib - // allocator. This is typically libstd, so this'll rarely be an - // error. - let mut allocator = None; - self.cstore.iter_crate_data(|_, data| { - if allocator.is_none() && data.root.has_default_lib_allocator { - allocator = Some(data.clone()); - } - }); - allocator }); - match allocation_crate_data { - Some(data) => { - // We have an allocator. We detect separately what kind it is, to allow for some - // flexibility in misconfiguration. - let attrs = data.get_item_attrs(CRATE_DEF_INDEX, self.sess); - let kind_interned = attr::first_attr_value_str_by_name(&attrs, "rustc_alloc_kind") - .map(Symbol::as_str); - let kind_str = kind_interned - .as_ref() - .map(|s| s as &str); - let alloc_kind = match kind_str { - None | - Some("lib") => AllocatorKind::DefaultLib, - Some("exe") => AllocatorKind::DefaultExe, - Some(other) => { - self.sess.err(&format!("Allocator kind {} not known", other)); - return; - } - }; - self.sess.allocator_kind.set(Some(alloc_kind)); - }, - None => { - if !attr::contains_name(&krate.attrs, "default_lib_allocator") { - self.sess.err("no global memory allocator found but one is \ - required; link to std or \ - add #[global_allocator] to a static item \ - that implements the GlobalAlloc trait."); - return; - } - self.sess.allocator_kind.set(Some(AllocatorKind::DefaultLib)); - } + if !has_default { + self.sess.err("no global memory allocator found but one is \ + required; link to std or \ + add #[global_allocator] to a static item \ + that implements the GlobalAlloc trait."); } + self.sess.allocator_kind.set(Some(AllocatorKind::DefaultLib)); fn has_global_allocator(krate: &ast::Crate) -> bool { struct Finder(bool); diff --git a/src/librustc_target/spec/aarch64_unknown_freebsd.rs b/src/librustc_target/spec/aarch64_unknown_freebsd.rs index 541f0564a01e2cfd82f1db1efdc24e8d75cfb3dd..b120f57192bfb7b0bb0d3b68a2198cc70f64082a 100644 --- a/src/librustc_target/spec/aarch64_unknown_freebsd.rs +++ b/src/librustc_target/spec/aarch64_unknown_freebsd.rs @@ -14,9 +14,6 @@ pub fn target() -> TargetResult { let mut base = super::freebsd_base::opts(); base.max_atomic_width = Some(128); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "aarch64-unknown-freebsd".to_string(), target_endian: "little".to_string(), diff --git a/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs b/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs index 2351d01469215499afd996d4ecfdd1ea9cd536b0..af7ec6a1787f0853ae77fe5bb51b77c4656099b5 100644 --- a/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/aarch64_unknown_linux_gnu.rs @@ -14,9 +14,6 @@ pub fn target() -> TargetResult { let mut base = super::linux_base::opts(); base.max_atomic_width = Some(128); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), diff --git a/src/librustc_target/spec/aarch64_unknown_linux_musl.rs b/src/librustc_target/spec/aarch64_unknown_linux_musl.rs index 5ab55a076f45b255f0009ab8412032744b2b54cf..e5ca91aabe56a46118933651d2b95403d03ce53d 100644 --- a/src/librustc_target/spec/aarch64_unknown_linux_musl.rs +++ b/src/librustc_target/spec/aarch64_unknown_linux_musl.rs @@ -14,9 +14,6 @@ pub fn target() -> TargetResult { let mut base = super::linux_musl_base::opts(); base.max_atomic_width = Some(128); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "aarch64-unknown-linux-musl".to_string(), target_endian: "little".to_string(), diff --git a/src/librustc_target/spec/hermit_base.rs b/src/librustc_target/spec/hermit_base.rs index 2a24f771e92897811a9c5ad1ed48fd0c547ee038..168eac685e4f3a4da8ce6eabf072fbe23d050494 100644 --- a/src/librustc_target/spec/hermit_base.rs +++ b/src/librustc_target/spec/hermit_base.rs @@ -21,7 +21,6 @@ pub fn opts() -> TargetOptions { ]); TargetOptions { - exe_allocation_crate: None, executables: true, has_elf_tls: true, linker_is_gnu: true, diff --git a/src/librustc_target/spec/l4re_base.rs b/src/librustc_target/spec/l4re_base.rs index 4ebc930d48b6fa2178ddb6e6c1ca22cc061fcb8c..7932adf3b1054077714b92de197ef4da3563180c 100644 --- a/src/librustc_target/spec/l4re_base.rs +++ b/src/librustc_target/spec/l4re_base.rs @@ -30,7 +30,6 @@ pub fn opts() -> TargetOptions { TargetOptions { executables: true, has_elf_tls: false, - exe_allocation_crate: None, panic_strategy: PanicStrategy::Abort, linker: Some("ld".to_string()), pre_link_args: args, diff --git a/src/librustc_target/spec/mips64_unknown_linux_gnuabi64.rs b/src/librustc_target/spec/mips64_unknown_linux_gnuabi64.rs index 1f60d918908d019a63de628d96dbfaa59a569a47..b80b6b561cd42554172e95cc4d21ae429e533510 100644 --- a/src/librustc_target/spec/mips64_unknown_linux_gnuabi64.rs +++ b/src/librustc_target/spec/mips64_unknown_linux_gnuabi64.rs @@ -28,9 +28,6 @@ pub fn target() -> TargetResult { features: "+mips64r2".to_string(), max_atomic_width: Some(64), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mips64el_unknown_linux_gnuabi64.rs b/src/librustc_target/spec/mips64el_unknown_linux_gnuabi64.rs index e42fde8d403fbcd4e37a8e0d8f1e91a92accbc63..1c835af6e412b1e9ea6db09aa9638b242a28cc38 100644 --- a/src/librustc_target/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/src/librustc_target/spec/mips64el_unknown_linux_gnuabi64.rs @@ -28,9 +28,6 @@ pub fn target() -> TargetResult { features: "+mips64r2".to_string(), max_atomic_width: Some(64), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mips_unknown_linux_gnu.rs b/src/librustc_target/spec/mips_unknown_linux_gnu.rs index 59e15137cf40d9e932bca7d3053b7d3b2eed5cd2..6331031c9a2847176752ff2b7c8b12b02852afc5 100644 --- a/src/librustc_target/spec/mips_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/mips_unknown_linux_gnu.rs @@ -27,9 +27,6 @@ pub fn target() -> TargetResult { features: "+mips32r2,+fpxx,+nooddspreg".to_string(), max_atomic_width: Some(32), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mips_unknown_linux_musl.rs b/src/librustc_target/spec/mips_unknown_linux_musl.rs index 8ee399ba56c329534235c6968f7ce0a0826f29a7..0b20765172a0250911ee289344bb425c329fd5a9 100644 --- a/src/librustc_target/spec/mips_unknown_linux_musl.rs +++ b/src/librustc_target/spec/mips_unknown_linux_musl.rs @@ -15,8 +15,6 @@ pub fn target() -> TargetResult { base.cpu = "mips32r2".to_string(); base.features = "+mips32r2,+soft-float".to_string(); base.max_atomic_width = Some(32); - // see #36994 - base.exe_allocation_crate = None; base.crt_static_default = false; Ok(Target { llvm_target: "mips-unknown-linux-musl".to_string(), diff --git a/src/librustc_target/spec/mips_unknown_linux_uclibc.rs b/src/librustc_target/spec/mips_unknown_linux_uclibc.rs index 384ab1e413123cf164a6730f7252095f314e0847..d3f614c982ae4903eae0f7c0dc22b5ed7a14e67e 100644 --- a/src/librustc_target/spec/mips_unknown_linux_uclibc.rs +++ b/src/librustc_target/spec/mips_unknown_linux_uclibc.rs @@ -27,9 +27,6 @@ pub fn target() -> TargetResult { features: "+mips32r2,+soft-float".to_string(), max_atomic_width: Some(32), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mipsel_unknown_linux_gnu.rs b/src/librustc_target/spec/mipsel_unknown_linux_gnu.rs index edd29164caca897677971d06f4ec8ecb9c4c3c8b..79ebefa79a320065ff012d4590ef9547fb83a54e 100644 --- a/src/librustc_target/spec/mipsel_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/mipsel_unknown_linux_gnu.rs @@ -28,9 +28,6 @@ pub fn target() -> TargetResult { features: "+mips32r2,+fpxx,+nooddspreg".to_string(), max_atomic_width: Some(32), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mipsel_unknown_linux_musl.rs b/src/librustc_target/spec/mipsel_unknown_linux_musl.rs index 1d9378ca1b81407baf89bcb4694469a1f5b800c4..042e2b71c32565f98dedcf716bef3257686e6340 100644 --- a/src/librustc_target/spec/mipsel_unknown_linux_musl.rs +++ b/src/librustc_target/spec/mipsel_unknown_linux_musl.rs @@ -15,8 +15,6 @@ pub fn target() -> TargetResult { base.cpu = "mips32r2".to_string(); base.features = "+mips32r2,+soft-float".to_string(); base.max_atomic_width = Some(32); - // see #36994 - base.exe_allocation_crate = None; base.crt_static_default = false; Ok(Target { llvm_target: "mipsel-unknown-linux-musl".to_string(), diff --git a/src/librustc_target/spec/mipsel_unknown_linux_uclibc.rs b/src/librustc_target/spec/mipsel_unknown_linux_uclibc.rs index a1db1791bb7ce6027f35f6bdf59e4b9cd63de7f7..8cb5cd3f03a677f024841f1572563d916c361526 100644 --- a/src/librustc_target/spec/mipsel_unknown_linux_uclibc.rs +++ b/src/librustc_target/spec/mipsel_unknown_linux_uclibc.rs @@ -28,9 +28,6 @@ pub fn target() -> TargetResult { features: "+mips32r2,+soft-float".to_string(), max_atomic_width: Some(32), - // see #36994 - exe_allocation_crate: None, - ..super::linux_base::opts() }, }) diff --git a/src/librustc_target/spec/mod.rs b/src/librustc_target/spec/mod.rs index c8af81c02ea4a48b5a8a72cd7e1307272532fd63..16dc2a91030f1723c0f937feb6788b9a1c3fb30f 100644 --- a/src/librustc_target/spec/mod.rs +++ b/src/librustc_target/spec/mod.rs @@ -596,9 +596,6 @@ pub struct TargetOptions { /// `eh_unwind_resume` lang item. pub custom_unwind_resume: bool, - /// If necessary, a different crate to link exe allocators by default - pub exe_allocation_crate: Option, - /// Flag indicating whether ELF TLS (e.g. #[thread_local]) is available for /// this target. pub has_elf_tls: bool, @@ -740,7 +737,6 @@ fn default() -> TargetOptions { link_env: Vec::new(), archive_format: "gnu".to_string(), custom_unwind_resume: false, - exe_allocation_crate: None, allow_asm: true, has_elf_tls: false, obj_is_bitcode: false, @@ -1025,7 +1021,6 @@ pub fn from_json(obj: Json) -> TargetResult { key!(archive_format); key!(allow_asm, bool); key!(custom_unwind_resume, bool); - key!(exe_allocation_crate, optional); key!(has_elf_tls, bool); key!(obj_is_bitcode, bool); key!(no_integrated_as, bool); @@ -1235,7 +1230,6 @@ fn to_json(&self) -> Json { target_option_val!(archive_format); target_option_val!(allow_asm); target_option_val!(custom_unwind_resume); - target_option_val!(exe_allocation_crate); target_option_val!(has_elf_tls); target_option_val!(obj_is_bitcode); target_option_val!(no_integrated_as); diff --git a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs index 1959871161343aa656d32cfdd816f357f6ff619b..1d0afcd5e0c608b4721024d301fe2b5187ed25b9 100644 --- a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs @@ -20,9 +20,6 @@ pub fn target() -> TargetResult { // for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474 base.relro_level = RelroLevel::Partial; - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc64-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), diff --git a/src/librustc_target/spec/powerpc64le_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc64le_unknown_linux_gnu.rs index 39840692dff188efd4e951f1681d87d1d989d7b6..01811c5a0c32227e2fcc72e20379cd2ae20dbb9c 100644 --- a/src/librustc_target/spec/powerpc64le_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/powerpc64le_unknown_linux_gnu.rs @@ -16,9 +16,6 @@ pub fn target() -> TargetResult { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); base.max_atomic_width = Some(64); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc64le-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), diff --git a/src/librustc_target/spec/powerpc64le_unknown_linux_musl.rs b/src/librustc_target/spec/powerpc64le_unknown_linux_musl.rs index 34ec82412289df36845f34a920fd13bcf33bff5c..590c5ba8d54b49fcba547674347ccbe4debe6d51 100644 --- a/src/librustc_target/spec/powerpc64le_unknown_linux_musl.rs +++ b/src/librustc_target/spec/powerpc64le_unknown_linux_musl.rs @@ -16,9 +16,6 @@ pub fn target() -> TargetResult { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); base.max_atomic_width = Some(64); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc64le-unknown-linux-musl".to_string(), target_endian: "little".to_string(), diff --git a/src/librustc_target/spec/powerpc_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc_unknown_linux_gnu.rs index c05b110a75d391e888c465d9d9ce74ec2709ab07..99d8d99fbb2b620c59a8c08b2b854fa9054ffd1b 100644 --- a/src/librustc_target/spec/powerpc_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/powerpc_unknown_linux_gnu.rs @@ -15,9 +15,6 @@ pub fn target() -> TargetResult { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string()); base.max_atomic_width = Some(32); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), diff --git a/src/librustc_target/spec/powerpc_unknown_linux_gnuspe.rs b/src/librustc_target/spec/powerpc_unknown_linux_gnuspe.rs index c76c3119c87c5deab3f7b39477472c102df01f0b..9b15b0a5dc4b7b3c80c81b411535733b3423a6fd 100644 --- a/src/librustc_target/spec/powerpc_unknown_linux_gnuspe.rs +++ b/src/librustc_target/spec/powerpc_unknown_linux_gnuspe.rs @@ -15,9 +15,6 @@ pub fn target() -> TargetResult { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mspe".to_string()); base.max_atomic_width = Some(32); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), target_endian: "big".to_string(), diff --git a/src/librustc_target/spec/powerpc_unknown_netbsd.rs b/src/librustc_target/spec/powerpc_unknown_netbsd.rs index 740222c9608054400464792a6e1901b732297cf9..98625a63f52980adefeac771fe27a349f44af36b 100644 --- a/src/librustc_target/spec/powerpc_unknown_netbsd.rs +++ b/src/librustc_target/spec/powerpc_unknown_netbsd.rs @@ -15,9 +15,6 @@ pub fn target() -> TargetResult { base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m32".to_string()); base.max_atomic_width = Some(32); - // see #36994 - base.exe_allocation_crate = None; - Ok(Target { llvm_target: "powerpc-unknown-netbsd".to_string(), target_endian: "big".to_string(), diff --git a/src/librustc_target/spec/s390x_unknown_linux_gnu.rs b/src/librustc_target/spec/s390x_unknown_linux_gnu.rs index c9a9625ebab95b59d85e99ca711589f525dc9f17..bd8b7e435d340e1a0cc676b65d1d391423ff4524 100644 --- a/src/librustc_target/spec/s390x_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/s390x_unknown_linux_gnu.rs @@ -19,8 +19,6 @@ pub fn target() -> TargetResult { // Pass the -vector feature string to LLVM to respect this assumption. base.features = "-vector".to_string(); base.max_atomic_width = Some(64); - // see #36994 - base.exe_allocation_crate = None; base.min_global_align = Some(16); Ok(Target { diff --git a/src/librustc_target/spec/sparc64_unknown_linux_gnu.rs b/src/librustc_target/spec/sparc64_unknown_linux_gnu.rs index f68b5fd24bf755dd128cc1ce49b374600e97525c..f2b99aa46d2d0cfc7f7fc72b39cce4a1856a3b37 100644 --- a/src/librustc_target/spec/sparc64_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/sparc64_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> TargetResult { let mut base = super::linux_base::opts(); base.cpu = "v9".to_string(); base.max_atomic_width = Some(64); - base.exe_allocation_crate = None; Ok(Target { llvm_target: "sparc64-unknown-linux-gnu".to_string(), diff --git a/src/librustc_target/spec/sparc_unknown_linux_gnu.rs b/src/librustc_target/spec/sparc_unknown_linux_gnu.rs index 4e352374f90b064a9132f1b1036f16084d2a29ec..81db39cd23f87d288915989613f2e5192391af51 100644 --- a/src/librustc_target/spec/sparc_unknown_linux_gnu.rs +++ b/src/librustc_target/spec/sparc_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> TargetResult { base.cpu = "v9".to_string(); base.max_atomic_width = Some(64); base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mv8plus".to_string()); - base.exe_allocation_crate = None; Ok(Target { llvm_target: "sparc-unknown-linux-gnu".to_string(), diff --git a/src/librustc_target/spec/sparcv9_sun_solaris.rs b/src/librustc_target/spec/sparcv9_sun_solaris.rs index 8bc233107b8bb5bf1c49616c65392bb7c76e2c5c..5029e857eb5431378e8a83fb4cf8e55f0bac56f6 100644 --- a/src/librustc_target/spec/sparcv9_sun_solaris.rs +++ b/src/librustc_target/spec/sparcv9_sun_solaris.rs @@ -16,7 +16,6 @@ pub fn target() -> TargetResult { // llvm calls this "v9" base.cpu = "v9".to_string(); base.max_atomic_width = Some(64); - base.exe_allocation_crate = None; Ok(Target { llvm_target: "sparcv9-sun-solaris".to_string(), diff --git a/src/librustc_target/spec/x86_64_rumprun_netbsd.rs b/src/librustc_target/spec/x86_64_rumprun_netbsd.rs index 684bf5a6c1026e2e950e679decfc18a22f883cda..e7570cd2da6ec84fd4cfa9b19fbe0849e2ef7ab1 100644 --- a/src/librustc_target/spec/x86_64_rumprun_netbsd.rs +++ b/src/librustc_target/spec/x86_64_rumprun_netbsd.rs @@ -21,7 +21,6 @@ pub fn target() -> TargetResult { base.has_rpath = false; base.position_independent_executables = false; base.disable_redzone = true; - base.exe_allocation_crate = None; base.stack_probes = true; Ok(Target {