about summary refs log tree commit diff
path: root/src/liballoc/lib.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-04 00:01:40 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-06 23:00:01 -0700
commit75014f7b1790e7ebdf13d38acc04dfdab6e450e9 (patch)
tree46fb046e002a37ba60f6e8b8ef5ee0675fbb7fd8 /src/liballoc/lib.rs
parentd743b8831e6dc5b390af112cc23159d667cf583b (diff)
downloadrust-75014f7b1790e7ebdf13d38acc04dfdab6e450e9.tar.gz
rust-75014f7b1790e7ebdf13d38acc04dfdab6e450e9.zip
libs: Fix miscellaneous fallout of librustrt
Diffstat (limited to 'src/liballoc/lib.rs')
-rw-r--r--src/liballoc/lib.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 511983da4f7..ca7ed6f4ba0 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -96,6 +96,21 @@ pub mod owned;
 pub mod arc;
 pub mod rc;
 
+// 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)]
+pub fn fixme_14344_be_sure_to_link_to_collections() {}
+
 #[cfg(not(test))]
 #[doc(hidden)]
 mod std {