Skip to content

Commit eabd7ad

Browse files
committed
---
yaml --- r: 136575 b: refs/heads/dist-snap c: b2b0737 h: refs/heads/master i: 136573: 2985b73 136571: 4b3b043 136567: 622ab3c 136559: 644bd48 136543: 398965f 136511: 21f0ef5 136447: 404d2e8 v: v3
1 parent faccb07 commit eabd7ad

File tree

17 files changed

+26
-121
lines changed

17 files changed

+26
-121
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: 189b7332968972f34cdbbbd9b62d97ababf53059
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 72841b128df8b6a4eb88b1048548e2eec5244449
9+
refs/heads/dist-snap: b2b0737fbe1b4be62cb3656dabf69c0eb7c5a89e
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/src/librustc/driver/config.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ debugging_opts!(
176176
SHOW_SPAN,
177177
COUNT_TYPE_SIZES,
178178
META_STATS,
179-
NO_OPT,
180179
GC,
181180
PRINT_LINK_ARGS,
182181
PRINT_LLVM_PASSES,
182+
LTO,
183183
AST_JSON,
184184
AST_JSON_NOEXPAND,
185185
LS,
@@ -211,13 +211,13 @@ pub fn debugging_opts_map() -> Vec<(&'static str, &'static str, u64)> {
211211
("count-type-sizes", "count the sizes of aggregate types",
212212
COUNT_TYPE_SIZES),
213213
("meta-stats", "gather metadata statistics", META_STATS),
214-
("no-opt", "do not optimize, even if -O is passed", NO_OPT),
215214
("print-link-args", "Print the arguments passed to the linker",
216215
PRINT_LINK_ARGS),
217216
("gc", "Garbage collect shared data (experimental)", GC),
218217
("print-llvm-passes",
219218
"Prints the llvm optimization passes being run",
220219
PRINT_LLVM_PASSES),
220+
("lto", "Perform LLVM link-time optimizations", LTO),
221221
("ast-json", "Print the AST as JSON and halt", AST_JSON),
222222
("ast-json-noexpand", "Print the pre-expansion AST as JSON and halt", AST_JSON_NOEXPAND),
223223
("ls", "List the symbols defined by a library crate", LS),
@@ -351,8 +351,6 @@ cgoptions!(
351351
"system linker to link outputs with"),
352352
link_args: Vec<String> = (Vec::new(), parse_list,
353353
"extra arguments to pass to the linker (space separated)"),
354-
lto: bool = (false, parse_bool,
355-
"perform LLVM link-time optimizations"),
356354
target_cpu: String = ("generic".to_string(), parse_string,
357355
"select target processor (llc -mcpu=help for details)"),
358356
target_feature: String = ("".to_string(), parse_string,
@@ -714,9 +712,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
714712
let target = matches.opt_str("target").unwrap_or(
715713
driver::host_triple().to_string());
716714
let opt_level = {
717-
if (debugging_opts & NO_OPT) != 0 {
718-
No
719-
} else if matches.opt_present("O") {
715+
if matches.opt_present("O") {
720716
if matches.opt_present("opt-level") {
721717
early_error("-O and --opt-level both provided");
722718
}

branches/dist-snap/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/dist-snap/src/librustc/driver/session.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl Session {
168168
self.debugging_opt(config::PRINT_LLVM_PASSES)
169169
}
170170
pub fn lto(&self) -> bool {
171-
self.opts.cg.lto
171+
self.debugging_opt(config::LTO)
172172
}
173173
pub fn no_landing_pads(&self) -> bool {
174174
self.debugging_opt(config::NO_LANDING_PADS)

branches/dist-snap/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/dist-snap/src/librustc/middle/resolve.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,7 +2928,7 @@ impl<'a> Resolver<'a> {
29282928
Some(span) => {
29292929
self.session
29302930
.span_note(span,
2931-
"conflicting value here");
2931+
"note conflicting value here");
29322932
}
29332933
}
29342934
}
@@ -2951,7 +2951,7 @@ impl<'a> Resolver<'a> {
29512951
Some(span) => {
29522952
self.session
29532953
.span_note(span,
2954-
"conflicting type here")
2954+
"note conflicting type here")
29552955
}
29562956
}
29572957
}

branches/dist-snap/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/dist-snap/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(())

branches/dist-snap/src/test/compile-fail/issue-11154.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// compile-flags: -C lto -C prefer-dynamic
11+
// compile-flags: -Z lto -C prefer-dynamic
1212

1313
// error-pattern: cannot prefer dynamic linking
1414

branches/dist-snap/src/test/debuginfo/cross-crate-type-uniquing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
extern crate cross_crate_debuginfo_type_uniquing;
1515

1616
// no-prefer-dynamic
17-
// compile-flags:-g -C lto
17+
// compile-flags:-g -Zlto
1818

1919
pub struct C;
2020
pub fn p() -> C {

branches/dist-snap/src/test/run-make/issue-14500/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
all:
1010
$(RUSTC) foo.rs --crate-type=rlib
11-
$(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a
11+
$(RUSTC) bar.rs --crate-type=staticlib -Zlto -L. -o $(TMPDIR)/libbar.a
1212
$(CC) foo.c -lbar -o $(call RUN_BINFILE,foo) $(EXTRACFLAGS)
1313
$(call RUN,foo)
1414

branches/dist-snap/src/test/run-make/lto-smoke-c/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
CC := $(CC:-g=)
55

66
all:
7-
$(RUSTC) foo.rs -C lto
7+
$(RUSTC) foo.rs -Z lto
88
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) -lstdc++
99
$(call RUN,bar)

branches/dist-snap/src/test/run-make/lto-smoke/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
all:
44
$(RUSTC) lib.rs
5-
$(RUSTC) main.rs -C lto
5+
$(RUSTC) main.rs -Z lto
66
$(call RUN,main)

branches/dist-snap/src/test/run-make/lto-syntax-extension/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ all: $(DOTEST)
1414
dotest:
1515
env
1616
$(RUSTC) lib.rs
17-
$(RUSTC) main.rs -C lto
17+
$(RUSTC) main.rs -Z lto
1818
$(call RUN,main)

branches/dist-snap/src/test/run-pass/capture_nil.rs

Lines changed: 0 additions & 39 deletions
This file was deleted.

branches/dist-snap/src/test/run-pass/sepcomp-lib-lto.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
// Check that we can use `-C lto` when linking against libraries that were
11+
// Check that we can use `-Z lto` when linking against libraries that were
1212
// separately compiled.
1313

1414
// aux-build:sepcomp_lib.rs
15-
// compile-flags: -C lto
15+
// compile-flags: -Z lto
1616
// no-prefer-dynamic
1717

1818
extern crate sepcomp_lib;

0 commit comments

Comments
 (0)