Skip to content

Commit 6280c33

Browse files
committed
---
yaml --- r: 114575 b: refs/heads/master c: cb3c4f9 h: refs/heads/master i: 114573: e41dc48 114571: d10da62 114567: a7628d6 114559: d3adc66 v: v3
1 parent 0fd8daf commit 6280c33

File tree

550 files changed

+6318
-5057
lines changed

Some content is hidden

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

550 files changed

+6318
-5057
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: a167caf1061ea81cb946ff4be2ca31cc1bc98310
2+
refs/heads/master: cb3c4f9c8293cf792bff887ff170f8c774ac8457
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ec0258a381b88b5574e3f8ce72ae553ac3a574b7
55
refs/heads/try: 7c6c492fb2af9a85f21ff952942df3523b22fd17

trunk/configure

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@ case $CFG_CPUTYPE in
348348
CFG_CPUTYPE=arm
349349
;;
350350

351+
armv7l)
352+
CFG_CPUTYPE=arm
353+
CFG_OSTYPE="${CFG_OSTYPE}eabihf"
354+
;;
355+
351356
x86_64 | x86-64 | x64 | amd64)
352357
CFG_CPUTYPE=x86_64
353358
;;
@@ -401,6 +406,7 @@ opt optimize 1 "build optimized rust code"
401406
opt optimize-cxx 1 "build optimized C++ code"
402407
opt optimize-llvm 1 "build optimized LLVM"
403408
opt optimize-tests 1 "build tests with optimizations"
409+
opt libcpp 1 "build with clang's libcpp"
404410
opt llvm-assertions 1 "build LLVM with assertions"
405411
opt debug 1 "build with extra debug fun"
406412
opt ratchet-bench 0 "ratchet benchmarks"
@@ -725,6 +731,7 @@ then
725731
if [ -z "$CC" ]
726732
then
727733
CFG_CC="clang"
734+
CFG_CXX="clang++"
728735
fi
729736
;;
730737
(*)
@@ -1042,53 +1049,71 @@ do
10421049

10431050
case "$CFG_CC" in
10441051
("ccache clang")
1045-
LLVM_CXX_32="ccache clang++ -m32 -Qunused-arguments"
1046-
LLVM_CC_32="ccache clang -m32 -Qunused-arguments"
1052+
LLVM_CXX_32="ccache clang++ -Qunused-arguments"
1053+
LLVM_CC_32="ccache clang -Qunused-arguments"
10471054

10481055
LLVM_CXX_64="ccache clang++ -Qunused-arguments"
10491056
LLVM_CC_64="ccache clang -Qunused-arguments"
1050-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
10511057
;;
10521058
("clang")
1053-
LLVM_CXX_32="clang++ -m32 -Qunused-arguments"
1054-
LLVM_CC_32="clang -m32 -Qunused-arguments"
1059+
LLVM_CXX_32="clang++ -Qunused-arguments"
1060+
LLVM_CC_32="clang -Qunused-arguments"
10551061

10561062
LLVM_CXX_64="clang++ -Qunused-arguments"
10571063
LLVM_CC_64="clang -Qunused-arguments"
1058-
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
10591064
;;
10601065
("ccache gcc")
1061-
LLVM_CXX_32="ccache g++ -m32"
1062-
LLVM_CC_32="ccache gcc -m32"
1066+
LLVM_CXX_32="ccache g++"
1067+
LLVM_CC_32="ccache gcc"
10631068

10641069
LLVM_CXX_64="ccache g++"
10651070
LLVM_CC_64="ccache gcc"
10661071
;;
10671072
("gcc")
1068-
LLVM_CXX_32="g++ -m32"
1069-
LLVM_CC_32="gcc -m32"
1073+
LLVM_CXX_32="g++"
1074+
LLVM_CC_32="gcc"
10701075

10711076
LLVM_CXX_64="g++"
10721077
LLVM_CC_64="gcc"
10731078
;;
10741079

10751080
(*)
10761081
msg "inferring LLVM_CXX/CC from CXX/CC = $CXX/$CC"
1077-
LLVM_CXX_32="$CXX -m32"
1078-
LLVM_CC_32="$CC -m32"
1082+
LLVM_CXX_32="$CXX"
1083+
LLVM_CC_32="$CC"
10791084

10801085
LLVM_CXX_64="$CXX"
10811086
LLVM_CC_64="$CC"
10821087
;;
10831088
esac
10841089

1085-
LLVM_CFLAGS_32="-m32"
1086-
LLVM_CXXFLAGS_32="-m32"
1087-
LLVM_LDFLAGS_32="-m32"
1090+
case "$CFG_CPUTYPE" in
1091+
(x86*)
1092+
LLVM_CXX_32="$LLVM_CXX_32 -m32"
1093+
LLVM_CC_32="$LLVM_CC_32 -m32"
1094+
1095+
LLVM_CFLAGS_32="-m32"
1096+
LLVM_CXXFLAGS_32="-m32"
1097+
LLVM_LDFLAGS_32="-m32"
1098+
1099+
LLVM_CFLAGS_64=""
1100+
LLVM_CXXFLAGS_64=""
1101+
LLVM_LDFLAGS_64=""
1102+
1103+
LLVM_CXX_32="$LLVM_CXX_32 -m32"
1104+
LLVM_CC_32="$LLVM_CC_32 -m32"
1105+
;;
1106+
1107+
(*)
1108+
LLVM_CFLAGS_32=""
1109+
LLVM_CXXFLAGS_32=""
1110+
LLVM_LDFLAGS_32=""
10881111

1089-
LLVM_CFLAGS_64=""
1090-
LLVM_CXXFLAGS_64=""
1091-
LLVM_LDFLAGS_64=""
1112+
LLVM_CFLAGS_64=""
1113+
LLVM_CXXFLAGS_64=""
1114+
LLVM_LDFLAGS_64=""
1115+
;;
1116+
esac
10921117

10931118
if echo $t | grep -q x86_64
10941119
then
@@ -1111,6 +1136,10 @@ do
11111136
CXXFLAGS=$LLVM_CXXFLAGS
11121137
LDFLAGS=$LLVM_LDFLAGS
11131138

1139+
if [ "$CFG_DISABLE_LIBCPP" != 1 ]; then
1140+
LLVM_OPTS="$LLVM_OPTS --enable-libcpp"
1141+
fi
1142+
11141143
LLVM_FLAGS="$LLVM_TARGETS $LLVM_OPTS $LLVM_BUILD \
11151144
$LLVM_HOST $LLVM_TARGET --with-python=$CFG_PYTHON"
11161145

trunk/mk/crates.mk

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,25 @@
5151

5252
TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
54-
workcache url log regex graphviz core rlibc alloc
54+
workcache url log regex graphviz core rlibc alloc debug
5555
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
5656
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5757
TOOLS := compiletest rustdoc rustc
5858

5959
DEPS_core :=
6060
DEPS_rlibc :=
6161
DEPS_alloc := core libc native:jemalloc
62+
DEPS_debug := std
6263
DEPS_std := core libc alloc native:rustrt native:backtrace
6364
DEPS_graphviz := std
6465
DEPS_green := std rand native:context_switch
6566
DEPS_rustuv := std native:uv native:uv_support
6667
DEPS_native := std
67-
DEPS_syntax := std term serialize collections log fmt_macros
68+
DEPS_syntax := std term serialize collections log fmt_macros debug
6869
DEPS_rustc := syntax native:rustllvm flate arena serialize sync getopts \
69-
collections time log graphviz
70+
collections time log graphviz debug
7071
DEPS_rustdoc := rustc native:hoedown serialize sync getopts collections \
71-
test time
72+
test time debug
7273
DEPS_flate := std native:miniz
7374
DEPS_arena := std collections
7475
DEPS_graphviz := std
@@ -79,7 +80,7 @@ DEPS_semver := std
7980
DEPS_uuid := std serialize rand
8081
DEPS_sync := std alloc
8182
DEPS_getopts := std
82-
DEPS_collections := std rand
83+
DEPS_collections := std rand debug
8384
DEPS_fourcc := syntax std
8485
DEPS_hexfloat := syntax std
8586
DEPS_num := std rand

trunk/mk/docs.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ $(foreach crate,$(COMPILER_DOC_CRATES),$(eval $(call DEF_LIB_DOC,$(crate),COMPIL
287287
ifdef CFG_DISABLE_DOCS
288288
$(info cfg: disabling doc build (CFG_DISABLE_DOCS))
289289
DOC_TARGETS :=
290+
COMPILER_DOC_TARGETS :=
290291
endif
291292

292293
docs: $(DOC_TARGETS)

trunk/src/compiletest/compiletest.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fn start(argc: int, argv: **u8) -> int {
5050
pub fn main() {
5151
let args = os::args();
5252
let config = parse_config(args.move_iter()
53-
.map(|x| x.to_strbuf())
53+
.map(|x| x.to_string())
5454
.collect());
5555
log_config(&config);
5656
run_tests(&config);
@@ -134,15 +134,15 @@ pub fn parse_config(args: Vec<String> ) -> Config {
134134
Config {
135135
compile_lib_path: matches.opt_str("compile-lib-path")
136136
.unwrap()
137-
.to_strbuf(),
138-
run_lib_path: matches.opt_str("run-lib-path").unwrap().to_strbuf(),
137+
.to_string(),
138+
run_lib_path: matches.opt_str("run-lib-path").unwrap().to_string(),
139139
rustc_path: opt_path(matches, "rustc-path"),
140140
clang_path: matches.opt_str("clang-path").map(|s| Path::new(s)),
141141
llvm_bin_path: matches.opt_str("llvm-bin-path").map(|s| Path::new(s)),
142142
src_base: opt_path(matches, "src-base"),
143143
build_base: opt_path(matches, "build-base"),
144144
aux_base: opt_path(matches, "aux-base"),
145-
stage_id: matches.opt_str("stage-id").unwrap().to_strbuf(),
145+
stage_id: matches.opt_str("stage-id").unwrap().to_string(),
146146
mode: FromStr::from_str(matches.opt_str("mode")
147147
.unwrap()
148148
.as_slice()).expect("invalid mode"),
@@ -156,32 +156,32 @@ pub fn parse_config(args: Vec<String> ) -> Config {
156156
ratchet_noise_percent:
157157
matches.opt_str("ratchet-noise-percent")
158158
.and_then(|s| from_str::<f64>(s.as_slice())),
159-
runtool: matches.opt_str("runtool").map(|x| x.to_strbuf()),
159+
runtool: matches.opt_str("runtool").map(|x| x.to_string()),
160160
host_rustcflags: matches.opt_str("host-rustcflags")
161-
.map(|x| x.to_strbuf()),
161+
.map(|x| x.to_string()),
162162
target_rustcflags: matches.opt_str("target-rustcflags")
163-
.map(|x| x.to_strbuf()),
163+
.map(|x| x.to_string()),
164164
jit: matches.opt_present("jit"),
165-
target: opt_str2(matches.opt_str("target").map(|x| x.to_strbuf())),
166-
host: opt_str2(matches.opt_str("host").map(|x| x.to_strbuf())),
165+
target: opt_str2(matches.opt_str("target").map(|x| x.to_string())),
166+
host: opt_str2(matches.opt_str("host").map(|x| x.to_string())),
167167
android_cross_path: opt_path(matches, "android-cross-path"),
168168
adb_path: opt_str2(matches.opt_str("adb-path")
169-
.map(|x| x.to_strbuf())),
169+
.map(|x| x.to_string())),
170170
adb_test_dir: opt_str2(matches.opt_str("adb-test-dir")
171-
.map(|x| x.to_strbuf())),
171+
.map(|x| x.to_string())),
172172
adb_device_status:
173173
"arm-linux-androideabi" ==
174174
opt_str2(matches.opt_str("target")
175-
.map(|x| x.to_strbuf())).as_slice() &&
175+
.map(|x| x.to_string())).as_slice() &&
176176
"(none)" !=
177177
opt_str2(matches.opt_str("adb-test-dir")
178-
.map(|x| x.to_strbuf())).as_slice() &&
178+
.map(|x| x.to_string())).as_slice() &&
179179
!opt_str2(matches.opt_str("adb-test-dir")
180-
.map(|x| x.to_strbuf())).is_empty(),
180+
.map(|x| x.to_string())).is_empty(),
181181
lldb_python_dir: matches.opt_str("lldb-python-dir")
182-
.map(|x| x.to_strbuf()),
182+
.map(|x| x.to_string()),
183183
test_shard: test::opt_shard(matches.opt_str("test-shard")
184-
.map(|x| x.to_strbuf())),
184+
.map(|x| x.to_string())),
185185
verbose: matches.opt_present("verbose")
186186
}
187187
}
@@ -201,7 +201,7 @@ pub fn log_config(config: &Config) {
201201
opt_str(&config.filter
202202
.as_ref()
203203
.map(|re| {
204-
re.to_str().into_strbuf()
204+
re.to_str().into_string()
205205
}))));
206206
logv(c, format_strbuf!("runtool: {}", opt_str(&config.runtool)));
207207
logv(c, format_strbuf!("host-rustcflags: {}",
@@ -218,7 +218,7 @@ pub fn log_config(config: &Config) {
218218
logv(c, format_strbuf!("adb_device_status: {}",
219219
config.adb_device_status));
220220
match config.test_shard {
221-
None => logv(c, "test_shard: (all)".to_strbuf()),
221+
None => logv(c, "test_shard: (all)".to_string()),
222222
Some((a,b)) => logv(c, format_strbuf!("test_shard: {}.{}", a, b))
223223
}
224224
logv(c, format_strbuf!("verbose: {}", config.verbose));
@@ -234,7 +234,7 @@ pub fn opt_str<'a>(maybestr: &'a Option<String>) -> &'a str {
234234

235235
pub fn opt_str2(maybestr: Option<String>) -> String {
236236
match maybestr {
237-
None => "(none)".to_strbuf(),
237+
None => "(none)".to_string(),
238238
Some(s) => s,
239239
}
240240
}
@@ -314,10 +314,10 @@ pub fn is_test(config: &Config, testfile: &Path) -> bool {
314314
// Pretty-printer does not work with .rc files yet
315315
let valid_extensions =
316316
match config.mode {
317-
Pretty => vec!(".rs".to_owned()),
318-
_ => vec!(".rc".to_owned(), ".rs".to_owned())
317+
Pretty => vec!(".rs".to_string()),
318+
_ => vec!(".rc".to_string(), ".rs".to_string())
319319
};
320-
let invalid_prefixes = vec!(".".to_owned(), "#".to_owned(), "~".to_owned());
320+
let invalid_prefixes = vec!(".".to_string(), "#".to_string(), "~".to_string());
321321
let name = testfile.filename_str().unwrap();
322322

323323
let mut valid = false;
@@ -367,7 +367,7 @@ pub fn make_test_name(config: &Config, testfile: &Path) -> test::TestName {
367367
pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
368368
let config = (*config).clone();
369369
// FIXME (#9639): This needs to handle non-utf8 paths
370-
let testfile = testfile.as_str().unwrap().to_strbuf();
370+
let testfile = testfile.as_str().unwrap().to_string();
371371
test::DynTestFn(proc() {
372372
runtest::run(config, testfile)
373373
})
@@ -376,7 +376,7 @@ pub fn make_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
376376
pub fn make_metrics_test_closure(config: &Config, testfile: &Path) -> test::TestFn {
377377
let config = (*config).clone();
378378
// FIXME (#9639): This needs to handle non-utf8 paths
379-
let testfile = testfile.as_str().unwrap().to_strbuf();
379+
let testfile = testfile.as_str().unwrap().to_string();
380380
test::DynMetricFn(proc(mm) {
381381
runtest::run_metrics(config, testfile, mm)
382382
})

trunk/src/compiletest/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3131
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
3232
re.captures(line).and_then(|caps| {
3333
let adjusts = caps.name("adjusts").len();
34-
let kind = caps.name("kind").to_ascii().to_lower().into_str().to_strbuf();
35-
let msg = caps.name("msg").trim().to_strbuf();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_str().to_string();
35+
let msg = caps.name("msg").trim().to_string();
3636

3737
debug!("line={} kind={} msg={}", line_num, kind, msg);
3838
Some(ExpectedError {

trunk/src/compiletest/header.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -170,23 +170,23 @@ fn iter_header(testfile: &Path, it: |&str| -> bool) -> bool {
170170
}
171171

172172
fn parse_error_pattern(line: &str) -> Option<String> {
173-
parse_name_value_directive(line, "error-pattern".to_strbuf())
173+
parse_name_value_directive(line, "error-pattern".to_string())
174174
}
175175

176176
fn parse_aux_build(line: &str) -> Option<String> {
177-
parse_name_value_directive(line, "aux-build".to_strbuf())
177+
parse_name_value_directive(line, "aux-build".to_string())
178178
}
179179

180180
fn parse_compile_flags(line: &str) -> Option<String> {
181-
parse_name_value_directive(line, "compile-flags".to_strbuf())
181+
parse_name_value_directive(line, "compile-flags".to_string())
182182
}
183183

184184
fn parse_run_flags(line: &str) -> Option<String> {
185-
parse_name_value_directive(line, "run-flags".to_strbuf())
185+
parse_name_value_directive(line, "run-flags".to_string())
186186
}
187187

188188
fn parse_check_line(line: &str) -> Option<String> {
189-
parse_name_value_directive(line, "check".to_strbuf())
189+
parse_name_value_directive(line, "check".to_string())
190190
}
191191

192192
fn parse_force_host(line: &str) -> bool {
@@ -206,15 +206,15 @@ fn parse_no_pretty_expanded(line: &str) -> bool {
206206
}
207207

208208
fn parse_exec_env(line: &str) -> Option<(String, String)> {
209-
parse_name_value_directive(line, "exec-env".to_strbuf()).map(|nv| {
209+
parse_name_value_directive(line, "exec-env".to_string()).map(|nv| {
210210
// nv is either FOO or FOO=BAR
211211
let mut strs: Vec<String> = nv.as_slice()
212212
.splitn('=', 1)
213-
.map(|s| s.to_strbuf())
213+
.map(|s| s.to_string())
214214
.collect();
215215

216216
match strs.len() {
217-
1u => (strs.pop().unwrap(), "".to_strbuf()),
217+
1u => (strs.pop().unwrap(), "".to_string()),
218218
2u => {
219219
let end = strs.pop().unwrap();
220220
(strs.pop().unwrap(), end)
@@ -225,7 +225,7 @@ fn parse_exec_env(line: &str) -> Option<(String, String)> {
225225
}
226226

227227
fn parse_pp_exact(line: &str, testfile: &Path) -> Option<Path> {
228-
match parse_name_value_directive(line, "pp-exact".to_strbuf()) {
228+
match parse_name_value_directive(line, "pp-exact".to_string()) {
229229
Some(s) => Some(Path::new(s)),
230230
None => {
231231
if parse_name_directive(line, "pp-exact") {
@@ -247,7 +247,7 @@ pub fn parse_name_value_directive(line: &str, directive: String)
247247
match line.find_str(keycolon.as_slice()) {
248248
Some(colon) => {
249249
let value = line.slice(colon + keycolon.len(),
250-
line.len()).to_strbuf();
250+
line.len()).to_string();
251251
debug!("{}: {}", directive, value);
252252
Some(value)
253253
}

0 commit comments

Comments
 (0)