Skip to content

Commit 469ff08

Browse files
committed
rustc: Enable #[cfg(windows)] and #[cfg(unix)]
1 parent eed3a36 commit 469ff08

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/rustc/driver/driver.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ fn default_configuration(sess: session, argv0: str, input: input) ->
4949
};
5050

5151
ret [ // Target bindings.
52+
attr::mk_word_item(os::family()),
5253
mk("target_os", os::sysname()),
5354
mk("target_family", os::family()),
5455
mk("target_arch", arch),

src/test/run-pass/cfg-family.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#[cfg(windows)]
2+
fn main() {
3+
}
4+
5+
#[cfg(unix)]
6+
fn main() {
7+
}

0 commit comments

Comments
 (0)