Skip to content

Commit b94927d

Browse files
committed
---
yaml --- r: 195895 b: refs/heads/beta c: 83d3503 h: refs/heads/master i: 195893: 62fa9cf 195891: 0fff996 195887: e9d83a1 v: v3
1 parent c9b1170 commit b94927d

File tree

2,808 files changed

+20797
-13787
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,808 files changed

+20797
-13787
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3030
refs/heads/batch: b7fd822592a4fb577552d93010c4a4e14f314346
3131
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
32-
refs/heads/beta: 8f0c952499ed31da47be09eaf198c095050f9cba
32+
refs/heads/beta: 83d3503012f9958bd9073e7699a53dce2c901214
3333
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3434
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
3535
refs/heads/tmp: 9de34a84bb300bab1bf0227f577331620cd60511

branches/beta/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/beta/configure

Lines changed: 15 additions & 5 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 identifers below
407+
# Thad's Cygwin identifiers below
408408

409409
# Vista 32 bit
410410
CYGWIN_NT-6.0)
@@ -479,10 +479,19 @@ 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-
file -L "$SHELL" | grep -q "x86[_-]64"
483-
if [ $? != 0 ]; then
484-
CFG_CPUTYPE=i686
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"
485488
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
486495
fi
487496

488497

@@ -517,7 +526,8 @@ VAL_OPTIONS=""
517526
opt valgrind 0 "run tests with valgrind (memcheck by default)"
518527
opt helgrind 0 "run tests with helgrind instead of memcheck"
519528
opt valgrind-rpass 1 "run rpass-valgrind tests with valgrind"
520-
opt docs 1 "build documentation"
529+
opt docs 1 "build standard library documentation"
530+
opt compiler-docs 0 "build compiler documentation"
521531
opt optimize 1 "build optimized rust code"
522532
opt optimize-cxx 1 "build optimized C++ code"
523533
opt optimize-llvm 1 "build optimized LLVM"

branches/beta/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 VARIABLES
245+
.SH ENVIRONMENT
246246

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

branches/beta/mk/crates.mk

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,17 +122,29 @@ 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
125135
DOC_CRATES := $(filter-out rustc, \
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))))))))))))
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
136148
COMPILER_DOC_CRATES := rustc rustc_trans rustc_borrowck rustc_resolve \
137149
rustc_typeck rustc_driver syntax rustc_privacy \
138150
rustc_lint

branches/beta/mk/docs.mk

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,10 @@ 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-
$(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPILER_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
263266

264267
ifdef CFG_DISABLE_DOCS
265268
$(info cfg: disabling doc build (CFG_DISABLE_DOCS))

branches/beta/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 everthing
182+
# On Bitrig, we need the relocation model to be PIC for everything
183183
ifeq (,$(filter $(OSTYPE_$(1)),bitrig))
184184
LLVM_MC_RELOCATION_MODEL="pic"
185185
else

branches/beta/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-
# inadvertantly included in the clean out.
135+
# inadvertently 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/beta/mk/tests.mk

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,11 @@ 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+
572577
# CTEST_DISABLE_NONSELFHOST_$(TEST_GROUP), if set, will cause that
573578
# test group to be disabled *unless* the target is able to build a
574579
# compiler (i.e. when the target triple is in the set of of host

branches/beta/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)]
1615
#![feature(old_io)]
17-
#![feature(old_path)]
1816
#![feature(rustc_private)]
1917
#![feature(unboxed_closures)]
2018
#![feature(std_misc)]
2119
#![feature(test)]
2220
#![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::new(&s),
118+
Some(s) => PathBuf::from(&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::new(&s)),
133+
clang_path: matches.opt_str("clang-path").map(|s| PathBuf::from(&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::new(&s)),
136+
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| PathBuf::from(&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::new(&s)),
144+
logfile: matches.opt_str("logfile").map(|s| PathBuf::from(&s)),
145145
runtool: matches.opt_str("runtool"),
146146
host_rustcflags: matches.opt_str("host-rustcflags"),
147147
target_rustcflags: matches.opt_str("target-rustcflags"),

branches/beta/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: uint,
18+
pub line: usize,
1919
pub kind: String,
2020
pub msg: String,
2121
}
2222

2323
#[derive(PartialEq, Debug)]
24-
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
24+
enum WhichLine { ThisLine, FollowPrevious(usize), AdjustBackward(usize) }
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<uint>,
62-
line_num: uint,
61+
fn parse_expected(last_nonfollow_error: Option<usize>,
62+
line_num: usize,
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/beta/src/compiletest/header.rs

Lines changed: 21 additions & 16 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-
// Don't run --pretty expanded when running pretty printing tests
44-
pub no_pretty_expanded: bool,
43+
// Run --pretty expanded when running pretty printing tests
44+
pub 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 no_pretty_expanded = false;
65+
let mut 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 !no_pretty_expanded {
100-
no_pretty_expanded = parse_no_pretty_expanded(ln);
99+
if !pretty_expanded {
100+
pretty_expanded = parse_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-
no_pretty_expanded: no_pretty_expanded,
155+
pretty_expanded: 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,6 +163,9 @@ 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+
}
166169
fn ignore_stage(config: &Config) -> String {
167170
format!("ignore-{}",
168171
config.stage_id.split('-').next().unwrap())
@@ -226,6 +229,7 @@ pub fn is_test_ignored(config: &Config, testfile: &Path) -> bool {
226229
let val = iter_header(testfile, &mut |ln| {
227230
!parse_name_directive(ln, "ignore-test") &&
228231
!parse_name_directive(ln, &ignore_target(config)) &&
232+
!parse_name_directive(ln, &ignore_architecture(config)) &&
229233
!parse_name_directive(ln, &ignore_stage(config)) &&
230234
!(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) &&
231235
!(config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) &&
@@ -291,8 +295,8 @@ fn parse_no_prefer_dynamic(line: &str) -> bool {
291295
parse_name_directive(line, "no-prefer-dynamic")
292296
}
293297

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

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

325329
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
326330
match parse_name_value_directive(line, "pp-exact") {
327-
Some(s) => Some(PathBuf::new(&s)),
331+
Some(s) => Some(PathBuf::from(&s)),
328332
None => {
329333
if parse_name_directive(line, "pp-exact") {
330-
testfile.file_name().map(|s| PathBuf::new(s))
334+
testfile.file_name().map(|s| PathBuf::from(s))
331335
} else {
332336
None
333337
}
@@ -336,7 +340,8 @@ fn parse_pp_exact(line: &str, testfile: &Path) -> Option<PathBuf> {
336340
}
337341

338342
fn parse_name_directive(line: &str, directive: &str) -> bool {
339-
line.contains(directive)
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))
340345
}
341346

342347
pub fn parse_name_value_directive(line: &str, directive: &str)
@@ -352,7 +357,7 @@ pub fn parse_name_value_directive(line: &str, directive: &str)
352357
}
353358
}
354359

355-
pub fn gdb_version_to_int(version_string: &str) -> int {
360+
pub fn gdb_version_to_int(version_string: &str) -> isize {
356361
let error_string = format!(
357362
"Encountered GDB version string with unexpected format: {}",
358363
version_string);
@@ -364,17 +369,17 @@ pub fn gdb_version_to_int(version_string: &str) -> int {
364369
panic!("{}", error_string);
365370
}
366371

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

370375
return major * 1000 + minor;
371376
}
372377

373-
pub fn lldb_version_to_int(version_string: &str) -> int {
378+
pub fn lldb_version_to_int(version_string: &str) -> isize {
374379
let error_string = format!(
375380
"Encountered LLDB version string with unexpected format: {}",
376381
version_string);
377382
let error_string = error_string;
378-
let major: int = version_string.parse().ok().expect(&error_string);
383+
let major: isize = version_string.parse().ok().expect(&error_string);
379384
return major;
380385
}

branches/beta/src/compiletest/procsrv.rs

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

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

1716
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1817
// Need to be sure to put both the lib_path and the aux path in the dylib
1918
// search path for the child.
2019
let mut path = DynamicLibrary::search_path();
2120
match aux_path {
22-
Some(p) => path.insert(0, Path::new(p)),
21+
Some(p) => path.insert(0, PathBuf::from(p)),
2322
None => {}
2423
}
25-
path.insert(0, Path::new(lib_path));
24+
path.insert(0, PathBuf::from(lib_path));
2625

2726
// Add the new dylib search path var
2827
let var = DynamicLibrary::envvar();
2928
let newpath = DynamicLibrary::create_path(&path);
30-
let newpath = String::from_utf8(newpath).unwrap();
29+
let newpath = newpath.to_str().unwrap().to_string();
3130
cmd.env(var, &newpath);
3231
}
3332

0 commit comments

Comments
 (0)