Skip to content

Commit 6e18fe4

Browse files
committed
Add missing dependency for Windows
1 parent 8309a4c commit 6e18fe4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/libpanic_unwind/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
#![feature(core_intrinsics)]
3535
#![feature(lang_items)]
3636
#![feature(libc)]
37-
#![feature(panic_unwind)]
37+
#![cfg_attr(not(any(target_env = "msvc",
38+
all(windows, target_arch = "x86_64", target_env = "gnu"))),
39+
feature(panic_unwind))]
3840
#![feature(raw)]
3941
#![feature(staged_api)]
4042
#![feature(unwind_attributes)]
@@ -45,6 +47,7 @@
4547

4648
extern crate alloc;
4749
extern crate libc;
50+
#[cfg(not(any(target_env = "msvc", all(windows, target_arch = "x86_64", target_env = "gnu"))))]
4851
extern crate unwind;
4952

5053
use core::intrinsics;

src/librustc/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#![feature(core_intrinsics)]
2727
#![feature(discriminant_value)]
2828
#![feature(i128_type)]
29+
#![cfg_attr(windows, feature(libc))]
2930
#![feature(never_type)]
3031
#![feature(nonzero)]
3132
#![feature(quote)]
@@ -44,6 +45,8 @@ extern crate core;
4445
extern crate fmt_macros;
4546
extern crate getopts;
4647
extern crate graphviz;
48+
#[cfg(windows)]
49+
extern crate libc;
4750
extern crate owning_ref;
4851
extern crate rustc_back;
4952
extern crate rustc_data_structures;

0 commit comments

Comments
 (0)