Skip to content

Commit a79c2d4

Browse files
committed
Auto merge of #1322 - redox-os:redox, r=gnzlbg
redox: support crt-static This reuses the code from musl to add support to Redox for crt-static. Linking to `m` is also unnecessary as it is included in `c`
2 parents 0d01633 + 319b7b5 commit a79c2d4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/redox/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,11 @@ extern {
377377
-> ::ssize_t;
378378
}
379379

380-
#[link(name = "c")]
381-
#[link(name = "m")]
380+
#[cfg_attr(feature = "rustc-dep-of-std",
381+
link(name = "c", kind = "static",
382+
cfg(target_feature = "crt-static")))]
383+
#[cfg_attr(feature = "rustc-dep-of-std",
384+
link(name = "c", cfg(not(target_feature = "crt-static"))))]
382385
extern {}
383386

384387
pub use self::net::*;

0 commit comments

Comments
 (0)