From 7cb157e74d2f190dd338e0f81c07bf427c22e02d Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 17 Jul 2015 08:17:43 -0700 Subject: [PATCH 1/2] Register new snapshots These new snapshots contain the knowledge of how to build the new triples of 32-bit MSVC and 32-bit FreeBSD, both of which should soon start having nightlies/auto builders! This does not currently register bitrig/freebsd snapshots but I believe those will be retroactively added in the near future. --- src/liballoc/lib.rs | 17 ----------------- src/libcollections/lib.rs | 7 ------- src/libcollections/string.rs | 3 --- src/liblibc/lib.rs | 4 ---- src/snapshots.txt | 8 ++++++++ 5 files changed, 8 insertions(+), 31 deletions(-) diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 5c1fd2a1aa1f4..ead0b4259a987 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -135,20 +135,3 @@ pub fn oom() -> ! { // allocate. unsafe { core::intrinsics::abort() } } - -// FIXME(#14344): When linking liballoc with libstd, this library will be linked -// as an rlib (it only exists as an rlib). It turns out that an -// optimized standard library doesn't actually use *any* symbols -// from this library. Everything is inlined and optimized away. -// This means that linkers will actually omit the object for this -// file, even though it may be needed in the future. -// -// To get around this for now, we define a dummy symbol which -// will never get inlined so the stdlib can call it. The stdlib's -// reference to this symbol will cause this library's object file -// to get linked in to libstd successfully (the linker won't -// optimize it out). -#[doc(hidden)] -#[unstable(feature = "issue_14344_fixme")] -#[cfg(stage0)] -pub fn fixme_14344_be_sure_to_link_to_collections() {} diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index a2b2ae220f88e..1f94838499218 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -133,13 +133,6 @@ pub mod btree_set { pub use btree::set::*; } - -// FIXME(#14344) this shouldn't be necessary -#[doc(hidden)] -#[unstable(feature = "issue_14344_fixme")] -#[cfg(stage0)] -pub fn fixme_14344_be_sure_to_link_to_collections() {} - #[cfg(not(test))] mod std { pub use core::ops; // RangeFull diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index ebff4a9126daf..cc58952be600a 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -979,7 +979,6 @@ impl ops::Index for String { } } -#[cfg(not(stage0))] #[stable(feature = "derefmut_for_string", since = "1.2.0")] impl ops::IndexMut> for String { #[inline] @@ -987,7 +986,6 @@ impl ops::IndexMut> for String { &mut self[..][index] } } -#[cfg(not(stage0))] #[stable(feature = "derefmut_for_string", since = "1.2.0")] impl ops::IndexMut> for String { #[inline] @@ -995,7 +993,6 @@ impl ops::IndexMut> for String { &mut self[..][index] } } -#[cfg(not(stage0))] #[stable(feature = "derefmut_for_string", since = "1.2.0")] impl ops::IndexMut> for String { #[inline] diff --git a/src/liblibc/lib.rs b/src/liblibc/lib.rs index dfcd08b69907a..c229df34ccf89 100644 --- a/src/liblibc/lib.rs +++ b/src/liblibc/lib.rs @@ -6535,8 +6535,4 @@ pub mod funcs { } } -#[doc(hidden)] -#[cfg(stage0)] -pub fn issue_14344_workaround() {} // FIXME #14344 force linkage to happen correctly - #[test] fn work_on_windows() { } // FIXME #10872 needed for a happy windows diff --git a/src/snapshots.txt b/src/snapshots.txt index 1b2613d8c5045..cb5790b34f4d3 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,11 @@ +S 2015-07-17 d4432b3 + linux-i386 93f6216a35d3bed3cedf244c9aff4cd716336bd9 + linux-x86_64 d8f4967fc71a153c925faecf95a7feadf7e463a4 + macos-i386 29852c4d4b5a851f16d627856a279cae5bf9bd01 + macos-x86_64 1a20259899321062a0325edb1d22990f05d18708 + winnt-i386 df50210f41db9a6f2968be5773b8e3bae32bb823 + winnt-x86_64 d7774b724988485652781a804bdf8e05d28ead48 + S 2015-05-24 ba0e1cd bitrig-x86_64 2a710e16e3e3ef3760df1f724d66b3af34c1ef3f freebsd-x86_64 370db40613f5c08563ed7e38357826dd42d4e0f8 From 24c5e492751489280f446f4efff1740a6c3e5aa1 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 20 Jul 2015 16:12:48 -0700 Subject: [PATCH 2/2] std: Fix compiling the standard library on i686-MSVC This commit fixes building the standard library with the `i686-pc-windows-msvc` target by correcting an included symbol name to the linker. --- src/libstd/sys/windows/thread_local.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libstd/sys/windows/thread_local.rs b/src/libstd/sys/windows/thread_local.rs index a2dbb0f834243..7550b7ce6c352 100644 --- a/src/libstd/sys/windows/thread_local.rs +++ b/src/libstd/sys/windows/thread_local.rs @@ -231,9 +231,12 @@ pub static p_thread_callback: unsafe extern "system" fn(LPVOID, DWORD, LPVOID) = on_tls_callback; -#[cfg(target_env = "msvc")] +#[cfg(all(target_env = "msvc", target_pointer_width = "64"))] #[link_args = "/INCLUDE:_tls_used"] extern {} +#[cfg(all(target_env = "msvc", target_pointer_width = "32"))] +#[link_args = "/INCLUDE:__tls_used"] +extern {} #[allow(warnings)] unsafe extern "system" fn on_tls_callback(h: LPVOID,