Skip to content

Commit fa9c2a4

Browse files
committed
---
yaml --- r: 195371 b: refs/heads/snap-stage3 c: 8f0c952 h: refs/heads/master i: 195369: 48c171c 195367: 214d7ee v: v3
1 parent 19b8f3b commit fa9c2a4

File tree

2,810 files changed

+13826
-20831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,810 files changed

+13826
-20831
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 14192d6df5cc714e5c9a3ca70b08f2514d977be2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6cf3b0b74aadcc1fe87adbd2c74876a1f6c920b3
4+
refs/heads/snap-stage3: 8f0c952499ed31da47be09eaf198c095050f9cba
55
refs/heads/try: 961e0358e1a5c0faaef606e31e9965742c1643bf
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/AUTHORS.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@ Peter Schuller <[email protected]>
606606
Peter Williams <[email protected]>
607607
Peter Zotov <[email protected]>
608608
Petter Remen <[email protected]>
609-
Phil Dawes <[email protected]>
609+
Phil Dawes <[email protected]>
610610
Phil Ruffwind <[email protected]>
611611
Philip Munksgaard <[email protected]>
612612
Philipp Brüschweiler <[email protected]>

branches/snap-stage3/configure

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ case $CFG_OSTYPE in
404404
CFG_OSTYPE=pc-windows-gnu
405405
;;
406406

407-
# Thad's Cygwin identifiers below
407+
# Thad's Cygwin identifers below
408408

409409
# Vista 32 bit
410410
CYGWIN_NT-6.0)
@@ -479,19 +479,10 @@ esac
479479
# Detect 64 bit linux systems with 32 bit userland and force 32 bit compilation
480480
if [ $CFG_OSTYPE = unknown-linux-gnu -a $CFG_CPUTYPE = x86_64 ]
481481
then
482-
# $SHELL does not exist in standard 'sh', so probably only exists
483-
# if configure is running in an interactive bash shell. /usr/bin/env
484-
# exists *everywhere*.
485-
BIN_TO_PROBE="$SHELL"
486-
if [ -z "$BIN_TO_PROBE" -a -e "/usr/bin/env" ]; then
487-
BIN_TO_PROBE="/usr/bin/env"
482+
file -L "$SHELL" | grep -q "x86[_-]64"
483+
if [ $? != 0 ]; then
484+
CFG_CPUTYPE=i686
488485
fi
489-
if [ -n "$BIN_TO_PROBE" ]; then
490-
file -L "$BIN_TO_PROBE" | grep -q "x86[_-]64"
491-
if [ $? != 0 ]; then
492-
CFG_CPUTYPE=i686
493-
fi
494-
fi
495486
fi
496487

497488

@@ -526,8 +517,7 @@ VAL_OPTIONS=""
526517
opt valgrind 0 "run tests with valgrind (memcheck by default)"
527518
opt helgrind 0 "run tests with helgrind instead of memcheck"
528519
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
529-
opt docs 1 "build standard library documentation"
530-
opt compiler-docs 0 "build compiler documentation"
520+
opt docs 1 "build documentation"
531521
opt optimize 1 "build optimized rust code"
532522
opt optimize-cxx 1 "build optimized C++ code"
533523
opt optimize-llvm 1 "build optimized LLVM"

branches/snap-stage3/man/rustc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ full debug info with variable and type information.
242242
\fBopt\-level\fR=\fIVAL\fR
243243
Optimize with possible levels 0\[en]3
244244

245-
.SH ENVIRONMENT
245+
.SH ENVIRONMENT VARIABLES
246246

247247
Some of these affect the output of the compiler, while others affect programs
248248
which link to the standard library.

branches/snap-stage3/mk/crates.mk

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -122,29 +122,17 @@ ONLY_RLIB_rustc_bitflags := 1
122122
# You should not need to edit below this line
123123
################################################################################
124124

125-
# On channels where the only usable crate is std, only build documentation for
126-
# std. This keeps distributions small and doesn't clutter up the API docs with
127-
# confusing internal details from the crates behind the facade.
128-
129-
ifeq ($(CFG_RELEASE_CHANNEL),stable)
130-
DOC_CRATES := std
131-
else
132-
ifeq ($(CFG_RELEASE_CHANNEL),beta)
133-
DOC_CRATES := std
134-
else
135125
DOC_CRATES := $(filter-out rustc, \
136-
$(filter-out rustc_trans, \
137-
$(filter-out rustc_typeck, \
138-
$(filter-out rustc_borrowck, \
139-
$(filter-out rustc_resolve, \
140-
$(filter-out rustc_driver, \
141-
$(filter-out rustc_privacy, \
142-
$(filter-out rustc_lint, \
143-
$(filter-out log, \
144-
$(filter-out getopts, \
145-
$(filter-out syntax, $(CRATES))))))))))))
146-
endif
147-
endif
126+
$(filter-out rustc_trans, \
127+
$(filter-out rustc_typeck, \
128+
$(filter-out rustc_borrowck, \
129+
$(filter-out rustc_resolve, \
130+
$(filter-out rustc_driver, \
131+
$(filter-out rustc_privacy, \
132+
$(filter-out rustc_lint, \
133+
$(filter-out log, \
134+
$(filter-out getopts, \
135+
$(filter-out syntax, $(CRATES))))))))))))
148136
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
149137
rustc_typeck rustc_driver syntax rustc_privacy \
150138
rustc_lint

branches/snap-stage3/mk/docs.mk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,7 @@ doc/$(1)/index.html: $$(LIB_DOC_DEP_$(1)) doc/$(1)/
259259
endef
260260

261261
$(foreach crate,$(DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),DOC_TARGETS)))
262-
263-
ifdef CFG_COMPILER_DOCS
264-
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
265-
endif
262+
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_DOC_TARGETS)))
266263

267264
ifdef CFG_DISABLE_DOCS
268265
$(info cfg: disabling doc build (CFG_DISABLE_DOCS))

branches/snap-stage3/mk/platform.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ define CFG_MAKE_TOOLCHAIN
179179

180180
ifeq ($$(findstring $(HOST_$(1)),arm aarch64 mips mipsel powerpc),)
181181

182-
# On Bitrig, we need the relocation model to be PIC for everything
182+
# On Bitrig, we need the relocation model to be PIC for everthing
183183
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
184184
LLVM_MC_RELOCATION_MODEL="pic"
185185
else

branches/snap-stage3/mk/target.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ endef
132132
# on $$(TSREQ$(1)_T_$(2)_H_$(3)), to ensure that no products will be
133133
# put into the target area until after the get-snapshot.py script has
134134
# had its chance to clean it out; otherwise the other products will be
135-
# inadvertently included in the clean out.
135+
# inadvertantly included in the clean out.
136136
SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
137137

138138
define TARGET_HOST_RULES

branches/snap-stage3/mk/tests.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -569,11 +569,6 @@ ifeq ($(CFG_OSTYPE),apple-darwin)
569569
CTEST_DISABLE_debuginfo-gdb = "gdb on darwin needs root"
570570
endif
571571

572-
ifeq ($(findstring android, $(CFG_TARGET)), android)
573-
CTEST_DISABLE_debuginfo-gdb =
574-
CTEST_DISABLE_debuginfo-lldb = "lldb tests are disabled on android"
575-
endif
576-
577572
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
578573
# test group to be disabled *unless* the target is able to build a
579574
# compiler (i.e. when the target triple is in the set of of host

branches/snap-stage3/src/compiletest/compiletest.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212

1313
#![feature(box_syntax)]
1414
#![feature(collections)]
15+
#![feature(int_uint)]
1516
#![feature(old_io)]
17+
#![feature(old_path)]
1618
#![feature(rustc_private)]
1719
#![feature(unboxed_closures)]
1820
#![feature(std_misc)]
1921
#![feature(test)]
2022
#![feature(path_ext)]
21-
#![feature(convert)]
22-
#![feature(str_char)]
2323

2424
#![deny(warnings)]
2525

@@ -115,7 +115,7 @@ pub fn parse_config(args: Vec<String> ) -> Config {
115115

116116
fn opt_path(m: &getopts::Matches, nm: &str) -> PathBuf {
117117
match m.opt_str(nm) {
118-
Some(s) => PathBuf::from(&s),
118+
Some(s) => PathBuf::new(&s),
119119
None => panic!("no option (=path) found for {}", nm),
120120
}
121121
}
@@ -130,18 +130,18 @@ pub fn parse_config(args: Vec<String> ) -> Config {
130130
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
131131
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
132132
rustc_path: opt_path(matches, "rustc-path"),
133-
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&s)),
133+
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::new(&s)),
134134
valgrind_path: matches.opt_str("valgrind-path"),
135135
force_valgrind: matches.opt_present("force-valgrind"),
136-
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&s)),
136+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::new(&s)),
137137
src_base: opt_path(matches, "src-base"),
138138
build_base: opt_path(matches, "build-base"),
139139
aux_base: opt_path(matches, "aux-base"),
140140
stage_id: matches.opt_str("stage-id").unwrap(),
141141
mode: matches.opt_str("mode").unwrap().parse().ok().expect("invalid mode"),
142142
run_ignored: matches.opt_present("ignored"),
143143
filter: filter,
144-
logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)),
144+
logfile: matches.opt_str("logfile").map(|s| PathBuf::new(&s)),
145145
runtool: matches.opt_str("runtool"),
146146
host_rustcflags: matches.opt_str("host-rustcflags"),
147147
target_rustcflags: matches.opt_str("target-rustcflags"),

branches/snap-stage3/src/compiletest/errors.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ use std::io::prelude::*;
1515
use std::path::Path;
1616

1717
pub struct ExpectedError {
18-
pub line: usize,
18+
pub line: uint,
1919
pub kind: String,
2020
pub msg: String,
2121
}
2222

2323
#[derive(PartialEq, Debug)]
24-
enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
24+
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
2525

2626
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
2727
/// The former is a "follow" that inherits its target from the preceding line;
@@ -58,8 +58,8 @@ pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
5858
}).collect()
5959
}
6060

61-
fn parse_expected(last_nonfollow_error: Option<usize>,
62-
line_num: usize,
61+
fn parse_expected(last_nonfollow_error: Option<uint>,
62+
line_num: uint,
6363
line: &str) -> Option<(WhichLine, ExpectedError)> {
6464
let start = match line.find("//~") { Some(i) => i, None => return None };
6565
let (follow, adjusts) = if line.char_at(start + 3) == '|' {

branches/snap-stage3/src/compiletest/header.rs

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pub struct TestProps {
4040
pub check_stdout: bool,
4141
// Don't force a --crate-type=dylib flag on the command line
4242
pub no_prefer_dynamic: bool,
43-
// Run --pretty expanded when running pretty printing tests
44-
pub pretty_expanded: bool,
43+
// Don't run --pretty expanded when running pretty printing tests
44+
pub no_pretty_expanded: bool,
4545
// Which pretty mode are we testing with, default to 'normal'
4646
pub pretty_mode: String,
4747
// Only compare pretty output and don't try compiling
@@ -62,7 +62,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
6262
let mut force_host = false;
6363
let mut check_stdout = false;
6464
let mut no_prefer_dynamic = false;
65-
let mut pretty_expanded = false;
65+
let mut no_pretty_expanded = false;
6666
let mut pretty_mode = None;
6767
let mut pretty_compare_only = false;
6868
let mut forbid_output = Vec::new();
@@ -96,8 +96,8 @@ pub fn load_props(testfile: &Path) -> TestProps {
9696
no_prefer_dynamic = parse_no_prefer_dynamic(ln);
9797
}
9898

99-
if !pretty_expanded {
100-
pretty_expanded = parse_pretty_expanded(ln);
99+
if !no_pretty_expanded {
100+
no_pretty_expanded = parse_no_pretty_expanded(ln);
101101
}
102102

103103
if pretty_mode.is_none() {
@@ -152,7 +152,7 @@ pub fn load_props(testfile: &Path) -> TestProps {
152152
force_host: force_host,
153153
check_stdout: check_stdout,
154154
no_prefer_dynamic: no_prefer_dynamic,
155-
pretty_expanded: pretty_expanded,
155+
no_pretty_expanded: no_pretty_expanded,
156156
pretty_mode: pretty_mode.unwrap_or("normal".to_string()),
157157
pretty_compare_only: pretty_compare_only,
158158
forbid_output: forbid_output,
@@ -163,9 +163,6 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
163163
fn ignore_target(config: &Config) -> String {
164164
format!("ignore-{}", util::get_os(&config.target))
165165
}
166-
fn ignore_architecture(config: &Config) -> String {
167-
format!("ignore-{}", util::get_arch(&config.target))
168-
}
169166
fn ignore_stage(config: &Config) -> String {
170167
format!("ignore-{}",
171168
config.stage_id.split('-').next().unwrap())
@@ -229,7 +226,6 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
229226
let val = iter_header(testfile, &mut |ln| {
230227
!parse_name_directive(ln, "ignore-test") &&
231228
!parse_name_directive(ln, &ignore_target(config)) &&
232-
!parse_name_directive(ln, &ignore_architecture(config)) &&
233229
!parse_name_directive(ln, &ignore_stage(config)) &&
234230
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
235231
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
@@ -295,8 +291,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
295291
parse_name_directive(line, "no-prefer-dynamic")
296292
}
297293

298-
fn parse_pretty_expanded(line: &str) -> bool {
299-
parse_name_directive(line, "pretty-expanded")
294+
fn parse_no_pretty_expanded(line: &str) -> bool {
295+
parse_name_directive(line, "no-pretty-expanded")
300296
}
301297

302298
fn parse_pretty_mode(line: &str) -> Option<String> {
@@ -328,10 +324,10 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
328324

329325
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
330326
match parse_name_value_directive(line, "pp-exact") {
331-
Some(s) => Some(PathBuf::from(&s)),
327+
Some(s) => Some(PathBuf::new(&s)),
332328
None => {
333329
if parse_name_directive(line, "pp-exact") {
334-
testfile.file_name().map(|s| PathBuf::from(s))
330+
testfile.file_name().map(|s| PathBuf::new(s))
335331
} else {
336332
None
337333
}
@@ -340,8 +336,7 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
340336
}
341337

342338
fn parse_name_directive(line: &str, directive: &str) -> bool {
343-
// This 'no-' rule is a quick hack to allow pretty-expanded and no-pretty-expanded to coexist
344-
line.contains(directive) && !line.contains(&("no-".to_string() + directive))
339+
line.contains(directive)
345340
}
346341

347342
pub fn parse_name_value_directive(line: &str, directive: &str)
@@ -357,7 +352,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
357352
}
358353
}
359354

360-
pub fn gdb_version_to_int(version_string: &str) -> isize {
355+
pub fn gdb_version_to_int(version_string: &str) -> int {
361356
let error_string = format!(
362357
"Encountered GDB version string with unexpected format: {}",
363358
version_string);
@@ -369,17 +364,17 @@ pub fn gdb_version_to_int(version_string: &str) -> isize {
369364
panic!("{}", error_string);
370365
}
371366

372-
let major: isize = components[0].parse().ok().expect(&error_string);
373-
let minor: isize = components[1].parse().ok().expect(&error_string);
367+
let major: int = components[0].parse().ok().expect(&error_string);
368+
let minor: int = components[1].parse().ok().expect(&error_string);
374369

375370
return major * 1000 + minor;
376371
}
377372

378-
pub fn lldb_version_to_int(version_string: &str) -> isize {
373+
pub fn lldb_version_to_int(version_string: &str) -> int {
379374
let error_string = format!(
380375
"Encountered LLDB version string with unexpected format: {}",
381376
version_string);
382377
let error_string = error_string;
383-
let major: isize = version_string.parse().ok().expect(&error_string);
378+
let major: int = version_string.parse().ok().expect(&error_string);
384379
return major;
385380
}

branches/snap-stage3/src/compiletest/procsrv.rs

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

11-
use std::dynamic_lib::DynamicLibrary;
12-
use std::io::prelude::*;
13-
use std::path::PathBuf;
11+
#![allow(deprecated)] // for old path, for dynamic_lib
12+
1413
use std::process::{ExitStatus, Command, Child, Output, Stdio};
14+
use std::io::prelude::*;
15+
use std::dynamic_lib::DynamicLibrary;
1516

1617
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1718
// Need to be sure to put both the lib_path and the aux path in the dylib
1819
// search path for the child.
1920
let mut path = DynamicLibrary::search_path();
2021
match aux_path {
21-
Some(p) => path.insert(0, PathBuf::from(p)),
22+
Some(p) => path.insert(0, Path::new(p)),
2223
None => {}
2324
}
24-
path.insert(0, PathBuf::from(lib_path));
25+
path.insert(0, Path::new(lib_path));
2526

2627
// Add the new dylib search path var
2728
let var = DynamicLibrary::envvar();
2829
let newpath = DynamicLibrary::create_path(&path);
29-
let newpath = newpath.to_str().unwrap().to_string();
30+
let newpath = String::from_utf8(newpath).unwrap();
3031
cmd.env(var, &newpath);
3132
}
3233

0 commit comments

Comments
 (0)