Skip to content

Commit 820ee84

Browse files
committed
---
yaml --- r: 134639 b: refs/heads/try c: f7693d6 h: refs/heads/master i: 134637: 727c914 134635: dc2480b 134631: 71fa405 134623: 14bdc34 v: v3
1 parent 90b7d92 commit 820ee84

File tree

6 files changed

+12
-64
lines changed

6 files changed

+12
-64
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 58413c09cd52ea4005d6ea7733ba1fb3a8f36589
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 437179ed8bf7f7672f84b19265df1ce569e70490
5-
refs/heads/try: 9fcfcaa347ffcace8503601bdc09bf3612e8585f
5+
refs/heads/try: f7693d6b85f5ab4deedf26cddc4a511fb9c209de
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/src/etc/make-win-dist.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ def make_win_dist(dist_root, target_triple):
5858
for src in rustc_dlls:
5959
shutil.copy(src, dist_bin_dir)
6060

61-
# Copy platform tools to platform-specific bin directory
62-
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "bin")
61+
# Copy platform tools (and another copy of runtime dlls) to platform-spcific bin directory
62+
target_bin_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "bin")
6363
if not os.path.exists(target_bin_dir):
6464
os.makedirs(target_bin_dir)
6565
for src in target_tools:
6666
shutil.copy(src, target_bin_dir)
6767

6868
# Copy platform libs to platform-spcific lib directory
69-
target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "gcc", "lib")
69+
target_lib_dir = os.path.join(dist_root, "bin", "rustlib", target_triple, "lib")
7070
if not os.path.exists(target_lib_dir):
7171
os.makedirs(target_lib_dir)
7272
for src in target_libs:

branches/try/src/librustc/driver/driver.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ pub fn phase_6_link_output(sess: &Session,
560560
trans: &CrateTranslation,
561561
outputs: &OutputFilenames) {
562562
let old_path = os::getenv("PATH").unwrap_or_else(||String::new());
563-
let mut new_path = sess.host_filesearch().get_tools_search_paths();
564-
new_path.push_all_move(os::split_paths(old_path.as_slice()));
563+
let mut new_path = os::split_paths(old_path.as_slice());
564+
new_path.push_all_move(sess.host_filesearch().get_tools_search_paths());
565565
os::setenv("PATH", os::join_paths(new_path.as_slice()).unwrap());
566566

567567
time(sess.time_passes(), "linking", (), |_|

branches/try/src/librustc/metadata/filesearch.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,8 @@ impl<'a> FileSearch<'a> {
150150
p.push(find_libdir(self.sysroot));
151151
p.push(rustlibdir());
152152
p.push(self.triple);
153-
let mut p1 = p.clone();
154-
p1.push("bin");
155-
let mut p2 = p.clone();
156-
p2.push("gcc");
157-
p2.push("bin");
158-
vec![p1, p2]
153+
p.push("bin");
154+
vec![p]
159155
}
160156
}
161157

branches/try/src/libstd/dynamic_lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ pub mod dl {
260260
dlclose(handle as *mut libc::c_void); ()
261261
}
262262

263-
pub enum RTLD {
263+
pub enum Rtld {
264264
Lazy = 1,
265265
Now = 2,
266266
Global = 256,

branches/try/src/libterm/win.rs

Lines changed: 3 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,15 @@ use Terminal;
2323
/// A Terminal implementation which uses the Win32 Console API.
2424
pub struct WinConsole<T> {
2525
buf: T,
26-
def_foreground: color::Color,
27-
def_background: color::Color,
2826
foreground: color::Color,
2927
background: color::Color,
3028
}
3129

32-
#[allow(non_snake_case)]
33-
#[repr(C)]
34-
struct CONSOLE_SCREEN_BUFFER_INFO {
35-
dwSize: [libc::c_short, ..2],
36-
dwCursorPosition: [libc::c_short, ..2],
37-
wAttributes: libc::WORD,
38-
srWindow: [libc::c_short, ..4],
39-
dwMaximumWindowSize: [libc::c_short, ..2],
40-
}
41-
4230
#[allow(non_snake_case)]
4331
#[link(name = "kernel32")]
4432
extern "system" {
4533
fn SetConsoleTextAttribute(handle: libc::HANDLE, attr: libc::WORD) -> libc::BOOL;
4634
fn GetStdHandle(which: libc::DWORD) -> libc::HANDLE;
47-
fn GetConsoleScreenBufferInfo(handle: libc::HANDLE,
48-
info: *mut CONSOLE_SCREEN_BUFFER_INFO) -> libc::BOOL;
4935
}
5036

5137
fn color_to_bits(color: color::Color) -> u16 {
@@ -70,26 +56,6 @@ fn color_to_bits(color: color::Color) -> u16 {
7056
}
7157
}
7258

73-
fn bits_to_color(bits: u16) -> color::Color {
74-
let color = match bits & 0x7 {
75-
0 => color::BLACK,
76-
0x1 => color::BLUE,
77-
0x2 => color::GREEN,
78-
0x4 => color::RED,
79-
0x6 => color::YELLOW,
80-
0x5 => color::MAGENTA,
81-
0x3 => color::CYAN,
82-
0x7 => color::WHITE,
83-
_ => unreachable!()
84-
};
85-
86-
if bits >= 8 {
87-
color | 0x8
88-
} else {
89-
color
90-
}
91-
}
92-
9359
impl<T: Writer> WinConsole<T> {
9460
fn apply(&mut self) {
9561
let _unused = self.buf.flush();
@@ -125,21 +91,7 @@ impl<T: Writer> Writer for WinConsole<T> {
12591

12692
impl<T: Writer> Terminal<T> for WinConsole<T> {
12793
fn new(out: T) -> Option<WinConsole<T>> {
128-
let fg;
129-
let bg;
130-
unsafe {
131-
let mut buffer_info = ::std::mem::uninitialized();
132-
if GetConsoleScreenBufferInfo(GetStdHandle(-11), &mut buffer_info) != 0 {
133-
fg = bits_to_color(buffer_info.wAttributes);
134-
bg = bits_to_color(buffer_info.wAttributes >> 4);
135-
} else {
136-
fg = color::WHITE;
137-
bg = color::BLACK;
138-
}
139-
}
140-
Some(WinConsole { buf: out,
141-
def_foreground: fg, def_background: bg,
142-
foreground: fg, background: bg } )
94+
Some(WinConsole { buf: out, foreground: color::WHITE, background: color::BLACK })
14395
}
14496

14597
fn fg(&mut self, color: color::Color) -> IoResult<bool> {
@@ -182,8 +134,8 @@ impl<T: Writer> Terminal<T> for WinConsole<T> {
182134
}
183135

184136
fn reset(&mut self) -> IoResult<()> {
185-
self.foreground = self.def_foreground;
186-
self.background = self.def_background;
137+
self.foreground = color::WHITE;
138+
self.background = color::BLACK;
187139
self.apply();
188140

189141
Ok(())

0 commit comments

Comments
 (0)