about summary refs log tree commit diff
path: root/src/libstd/rtdeps.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/rtdeps.rs')
-rw-r--r--src/libstd/rtdeps.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libstd/rtdeps.rs b/src/libstd/rtdeps.rs
index a3b2ab7705e..8383b3ec189 100644
--- a/src/libstd/rtdeps.rs
+++ b/src/libstd/rtdeps.rs
@@ -44,6 +44,14 @@ extern {}
 #[link(name = "pthread")]
 extern {}
 
+// For PNaCl targets, nacl_io is a Pepper wrapper for some IO functions
+// missing (ie always error) in Newlib.
+#[cfg(all(target_os = "nacl", not(test)))]
+#[link(name = "nacl_io", kind = "static")]
+#[link(name = "c++", kind = "static")] // for `nacl_io` and EH.
+#[link(name = "pthread", kind = "static")]
+extern {}
+
 #[cfg(target_os = "macos")]
 #[link(name = "System")]
 extern {}