Remove some unnecessary patches

cc #337
This commit is contained in:
bjorn3 2019-06-23 11:22:16 +02:00
parent dd15051f5a
commit 05307af672
2 changed files with 0 additions and 82 deletions

View file

@ -1,25 +0,0 @@
From 2bc2ef06e118c6fba0626c0e9bf24fed873405b2 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Sat, 29 Dec 2018 12:37:34 +0100
Subject: [PATCH] Workaround for libstd crash
I think this is related to the use of TLS inside those functions
---
src/libstd/rt.rs | 2 +-
1 file changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libstd/rt.rs b/src/libstd/rt.rs
index 5ddb66b..6a0d0b5 100644
--- a/src/libstd/rt.rs
+++ b/src/libstd/rt.rs
@@ -51,7 +51,7 @@ fn lang_start_internal(main: &(dyn Fn() -> i32 + Sync + ::panic::RefUnwindSafe),
#[cfg(not(feature = "backtrace"))]
let exit_code = panic::catch_unwind(move || main());
- sys_common::cleanup();
+ //sys_common::cleanup();
exit_code.unwrap_or(101) as isize
}
}
--
2.17.2 (Apple Git-113)

View file

@ -1,57 +0,0 @@
From 9e8b8114de61ecdbf39f7582d7a3280ef2bfd339 Mon Sep 17 00:00:00 2001
From: bjorn3 <bjorn3@users.noreply.github.com>
Date: Sun, 23 Jun 2019 10:37:53 +0200
Subject: [PATCH] Don't use OS TLS
---
src/libstd/thread/local.rs | 4 ++--
src/libstd/thread/mod.rs | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs
index 9b355aa..a074aa5 100644
--- a/src/libstd/thread/local.rs
+++ b/src/libstd/thread/local.rs
@@ -154,10 +154,10 @@ macro_rules! __thread_local_inner {
fn __init() -> $t { $init }
unsafe fn __getit() -> $crate::option::Option<&'static $t> {
- #[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
static __KEY: $crate::thread::__StaticLocalKeyInner<$t> =
$crate::thread::__StaticLocalKeyInner::new();
+ /*
#[thread_local]
#[cfg(all(
target_thread_local,
@@ -172,6 +172,7 @@ macro_rules! __thread_local_inner {
))]
static __KEY: $crate::thread::__OsLocalKeyInner<$t> =
$crate::thread::__OsLocalKeyInner::new();
+ */
__KEY.get(__init)
}
@@ -320,7 +321,6 @@ mod lazy {
/// On some platforms like wasm32 there's no threads, so no need to generate
/// thread locals and we can instead just use plain statics!
#[doc(hidden)]
-#[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
pub mod statik {
use super::lazy::LazyKeyInner;
use crate::fmt;
diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs
index 35de4f4..f142646 100644
--- a/src/libstd/thread/mod.rs
+++ b/src/libstd/thread/mod.rs
@@ -195,7 +195,6 @@ pub use self::local::{LocalKey, AccessError};
// where available, but both are needed.
#[unstable(feature = "libstd_thread_internals", issue = "0")]
-#[cfg(all(target_arch = "wasm32", not(target_feature = "atomics")))]
#[doc(hidden)] pub use self::local::statik::Key as __StaticLocalKeyInner;
#[unstable(feature = "libstd_thread_internals", issue = "0")]
#[cfg(target_thread_local)]
--
2.20.1 (Apple Git-117)