Skip to content

Commit b97df0b

Browse files
committed
Fix Linux libtest
1 parent e1613a6 commit b97df0b

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From eaa0c3eac2067c7c08913653ebef10c103c1255f Mon Sep 17 00:00:00 2001
2+
From: bjorn3 <[email protected]>
3+
Date: Mon, 16 Dec 2019 11:46:10 +0100
4+
Subject: [PATCH] [libstd] Revert arg initialization on linux to not require
5+
#[link_section]
6+
7+
---
8+
src/libstd/sys/unix/args.rs | 5 +----
9+
1 file changed, 1 insertion(+), 4 deletions(-)
10+
11+
diff --git a/src/libstd/sys/unix/args.rs b/src/libstd/sys/unix/args.rs
12+
index 2ed1585..b4b021a 100644
13+
--- a/src/libstd/sys/unix/args.rs
14+
+++ b/src/libstd/sys/unix/args.rs
15+
@@ -83,10 +83,7 @@ mod imp {
16+
// On Linux-GNU, we rely on `ARGV_INIT_ARRAY` below to initialize
17+
// `ARGC` and `ARGV`. But in Miri that does not actually happen so we
18+
// still initialize here.
19+
- #[cfg(any(
20+
- miri,
21+
- not(all(target_os = "linux", target_env = "gnu"))
22+
- ))]
23+
+ // `#[link_section]` is not yet supported by cg_clif
24+
really_init(_argc, _argv);
25+
}
26+
27+
--
28+
2.20.1
29+

0 commit comments

Comments
 (0)