Skip to content

Commit 1c2f4d7

Browse files
committed
---
yaml --- r: 124639 b: refs/heads/try c: 316719e h: refs/heads/master i: 124637: d76fdc9 124635: 472fa9b 124631: c852486 124623: 7fd624d 124607: e017157 v: v3
1 parent 117ca50 commit 1c2f4d7

File tree

510 files changed

+23361
-21288
lines changed

Some content is hidden

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

510 files changed

+23361
-21288
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: f15d6d28396e8700b6c3f2704204a2769e710403
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 9fc8394d3bce22ab483f98842434c84c396212ae
5-
refs/heads/try: 9dc667d472630c52a792f47e8ea67337ec23b224
5+
refs/heads/try: 316719e625d975f1f29104e78101f2b3521291f4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ src/etc/pkg/rust-logo.ico binary
88
src/etc/pkg/rust-logo.png binary
99
src/rt/msvc/* -whitespace
1010
src/rt/valgrind/* -whitespace
11+
*.woff binary

branches/try/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ src/etc/dl
8686
.settings/
8787
/build
8888
i686-pc-mingw32/
89-
src/librustc/lib/llvmdeps.rs
89+
src/librustc_llvm/llvmdeps.rs
9090
*.pot

branches/try/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ opt ccache 0 "invoke gcc/clang via ccache to reuse object files between builds"
418418
opt local-rust 0 "use an installed rustc rather than downloading a snapshot"
419419
opt inject-std-version 1 "inject the current compiler version of libstd into programs"
420420
opt llvm-static-stdcpp 0 "statically link to libstdc++ for LLVM"
421-
opt rpath 1 "build rpaths into rustc itself"
421+
opt rpath 0 "build rpaths into rustc itself"
422422
opt nightly 0 "build nightly packages"
423423
opt verify-install 1 "verify installed binaries work"
424424
opt jemalloc 1 "build liballoc with jemalloc"

branches/try/man/rustc.1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTC "1" "March 2014" "rustc 0.11.0" "User Commands"
1+
.TH RUSTC "1" "March 2014" "rustc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustc \- The Rust compiler
44
.SH SYNOPSIS
@@ -11,6 +11,9 @@ This program is a compiler for the Rust language, available at
1111

1212
.SH OPTIONS
1313

14+
.TP
15+
\fB\-\-crate-name NAME\fR
16+
Specify the name of the crate being built
1417
.TP
1518
\fB\-\-crate-type=[bin|lib|dylib|rlib|staticlib]\fR
1619
Configure the flavor of rust crate that is generated (default `bin`)
@@ -60,8 +63,9 @@ Parse only; do not compile, assemble, or link
6063
\fB\-\-pretty\fR [TYPE]
6164
Pretty-print the input instead of compiling; valid types are: normal
6265
(un-annotated source), expanded (crates expanded), typed (crates
63-
expanded, with type annotations), or identified (fully parenthesized,
64-
AST nodes and blocks with IDs)
66+
expanded, with type annotations), identified (fully parenthesized,
67+
AST nodes and blocks with IDs), or flowgraph=<nodeid> (graphviz
68+
formatted flowgraph for node)
6569
.TP
6670
\fB\-\-dep-info\fR [FILENAME]
6771
Output dependency info to <filename> after compiling, in o format suitable
@@ -138,8 +142,8 @@ A space-separated list of arguments to pass through to LLVM.
138142
If specified, the compiler will save more files (.bc, .o, .no-opt.bc) generated
139143
throughout compilation in the output directory.
140144
.TP
141-
\fBno-rpath\fR
142-
If specified, then the rpath value for dynamic libraries will not be set in
145+
\fBrpath\fR
146+
If specified, then the rpath value for dynamic libraries will be set in
143147
either dynamic library or executable outputs.
144148
.TP
145149
\fBno-prepopulate-passes\fR

branches/try/man/rustdoc.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH RUSTDOC "1" "March 2014" "rustdoc 0.11.0" "User Commands"
1+
.TH RUSTDOC "1" "March 2014" "rustdoc 0.12.0-pre" "User Commands"
22
.SH NAME
33
rustdoc \- generate documentation from Rust source code
44
.SH SYNOPSIS

branches/try/mk/crates.mk

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,30 @@
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-
url log regex graphviz core rlibc alloc debug rustrt
55-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
54+
url log regex graphviz core rlibc alloc debug rustrt \
55+
unicode
56+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5658
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5759
TOOLS := compiletest rustdoc rustc
5860

5961
DEPS_core :=
6062
DEPS_rlibc :=
63+
DEPS_unicode := core
6164
DEPS_alloc := core libc native:jemalloc
6265
DEPS_debug := std
6366
DEPS_rustrt := alloc core libc collections native:rustrt_native
64-
DEPS_std := core libc rand alloc collections rustrt sync \
67+
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6568
native:rust_builtin native:backtrace
6669
DEPS_graphviz := std
6770
DEPS_green := std native:context_switch
6871
DEPS_rustuv := std native:uv native:uv_support
6972
DEPS_native := std
7073
DEPS_syntax := std term serialize log fmt_macros debug
71-
DEPS_rustc := syntax native:rustllvm flate arena serialize getopts \
72-
time log graphviz debug
74+
DEPS_rustc := syntax flate arena serialize getopts \
75+
time log graphviz debug rustc_llvm rustc_back
76+
DEPS_rustc_llvm := native:rustllvm libc std
77+
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7378
DEPS_rustdoc := rustc native:hoedown serialize getopts \
7479
test time debug
7580
DEPS_flate := std native:miniz
@@ -82,7 +87,7 @@ DEPS_semver := std
8287
DEPS_uuid := std serialize
8388
DEPS_sync := core alloc rustrt collections
8489
DEPS_getopts := std
85-
DEPS_collections := core alloc
90+
DEPS_collections := core alloc unicode
8691
DEPS_fourcc := rustc syntax std
8792
DEPS_hexfloat := rustc syntax std
8893
DEPS_num := std
@@ -108,6 +113,7 @@ ONLY_RLIB_rlibc := 1
108113
ONLY_RLIB_alloc := 1
109114
ONLY_RLIB_rand := 1
110115
ONLY_RLIB_collections := 1
116+
ONLY_RLIB_unicode := 1
111117

112118
################################################################################
113119
# You should not need to edit below this line

branches/try/mk/dist.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ distcheck-tar-bins: dist-tar-bins
259259
$(Q)cd tmp/distcheck && tar -xzf ../../dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz
260260
$(Q)mkdir -p tmp/distcheck/tarbininstall
261261
$(Q)sh tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix=tmp/distcheck/tarbininstall
262-
$(Q)tmp/distcheck/tarbininstall/bin/rustc --version
263262
$(Q)sh tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix=tmp/distcheck/tarbininstall --uninstall
264263
$(Q)rm -Rf tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)
265264
$(Q)rm -Rf tmp/distcheck/tarbininstall

branches/try/mk/install.mk

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ else
1414
MAYBE_DISABLE_VERIFY=
1515
endif
1616

17-
install: dist-install-dir-$(CFG_BUILD)-with-target-libs
18-
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
17+
install: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
18+
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)" "$(MAYBE_DISABLE_VERIFY)"
1919
# Remove tmp files while we can because they may have been created under sudo
2020
$(Q)rm -R tmp/dist
2121

22-
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs
23-
$(Q)sh tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
22+
uninstall: dist-install-dir-$(CFG_BUILD)-with-target-libs | tmp/empty_dir
23+
$(Q)cd tmp/empty_dir && sh ../../tmp/dist/$(PKG_NAME)-$(CFG_BUILD)/install.sh --uninstall --prefix="$(DESTDIR)$(CFG_PREFIX)" --libdir="$(DESTDIR)$(CFG_LIBDIR)" --mandir="$(DESTDIR)$(CFG_MANDIR)"
2424
# Remove tmp files while we can because they may have been created under sudo
2525
$(Q)rm -R tmp/dist
2626

27+
tmp/empty_dir:
28+
mkdir -p $@
2729

2830
######################################################################
2931
# Android remote installation

branches/try/mk/llvm.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ $(foreach host,$(CFG_HOST), \
5757
$(foreach host,$(CFG_HOST), \
5858
$(eval LLVM_CONFIGS := $(LLVM_CONFIGS) $(LLVM_CONFIG_$(host))))
5959

60-
$(S)src/librustc/lib/llvmdeps.rs: \
60+
$(S)src/librustc_llvm/llvmdeps.rs: \
6161
$(LLVM_CONFIGS) \
6262
$(S)src/etc/mklldeps.py \
6363
$(MKFILE_DEPS)

branches/try/mk/main.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=0.11.0
17-
CFG_RELEASE_LABEL=
16+
CFG_RELEASE_NUM=0.12.0
17+
CFG_RELEASE_LABEL=-pre
1818

1919
CFG_FILENAME_EXTRA=4e7c5e5c
2020

@@ -122,8 +122,8 @@ endif
122122
ifdef TRACE
123123
CFG_RUSTC_FLAGS += -Z trace
124124
endif
125-
ifdef CFG_DISABLE_RPATH
126-
CFG_RUSTC_FLAGS += -C no-rpath
125+
ifdef CFG_ENABLE_RPATH
126+
CFG_RUSTC_FLAGS += -C rpath
127127
endif
128128

129129
# The executables crated during this compilation process have no need to include

branches/try/mk/target.mk

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,6 @@ $(foreach host,$(CFG_HOST), \
6868
# $(4) is the crate name
6969
define RUST_TARGET_STAGE_N
7070

71-
# NOTE: after a stage0 snap this should be just EXTRA_FILENAME, not with a stage
72-
# or target bound
73-
EXTRA_FILENAME_$(1)_$(2) = -C extra-filename=-$$(CFG_FILENAME_EXTRA)
74-
ifeq ($(1),0)
75-
ifeq ($$(CFG_BUILD),$(2))
76-
EXTRA_FILENAME_$(1)_$(2) =
77-
endif
78-
endif
79-
8071
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): CFG_COMPILER_HOST_TRIPLE = $(2)
8172
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
8273
$$(CRATEFILE_$(4)) \
@@ -95,7 +86,7 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9586
-L "$$(dir $$(LLVM_STDCPP_LOCATION_$(2)))" \
9687
$$(RUSTFLAGS_$(4)) \
9788
--out-dir $$(@D) \
98-
$$(EXTRA_FILENAME_$(1)_$(2)) \
89+
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \
9990
$$<
10091
@touch $$@
10192
$$(call LIST_ALL_OLD_GLOB_MATCHES,\
@@ -143,7 +134,7 @@ SNAPSHOT_RUSTC_POST_CLEANUP=$(HBIN0_H_$(CFG_BUILD))/rustc$(X_$(CFG_BUILD))
143134

144135
define TARGET_HOST_RULES
145136

146-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc: $(S)src/librustc/lib/llvmdeps.rs
137+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.rustc_llvm: $(S)src/librustc_llvm/llvmdeps.rs
147138

148139
$$(TBIN$(1)_T_$(2)_H_$(3))/:
149140
mkdir -p $$@

branches/try/mk/tests.mk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
# The names of crates that must be tested
1717

18-
# libcore tests are in a separate crate
18+
# libcore/libunicode tests are in a separate crate
1919
DEPS_coretest :=
2020
$(eval $(call RUST_CRATE,coretest))
2121

22-
TEST_TARGET_CRATES = $(filter-out core,$(TARGET_CRATES)) coretest
22+
TEST_TARGET_CRATES = $(filter-out core unicode,$(TARGET_CRATES)) coretest
2323
TEST_DOC_CRATES = $(DOC_CRATES)
2424
TEST_HOST_CRATES = $(HOST_CRATES)
2525
TEST_CRATES = $(TEST_TARGET_CRATES) $(TEST_HOST_CRATES)
@@ -171,7 +171,7 @@ endif
171171
# Main test targets
172172
######################################################################
173173

174-
check: cleantmptestlogs cleantestlibs tidy check-notidy
174+
check: cleantmptestlogs cleantestlibs check-notidy tidy
175175

176176
check-notidy: cleantmptestlogs cleantestlibs all check-stage2
177177
$(Q)$(CFG_PYTHON) $(S)src/etc/check-summary.py tmp/*.log

branches/try/src/compiletest/compiletest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ pub fn log_config(config: &Config) {
187187
opt_str(&config.filter
188188
.as_ref()
189189
.map(|re| {
190-
re.to_str().into_string()
190+
re.to_string().into_string()
191191
}))));
192192
logv(c, format!("runtool: {}", opt_str(&config.runtool)));
193193
logv(c, format!("host-rustcflags: {}",

branches/try/src/compiletest/errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ 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();
34+
let kind = caps.name("kind").to_ascii().to_lower().into_string();
3535
let msg = caps.name("msg").trim().to_string();
3636

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

branches/try/src/compiletest/procsrv.rs

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

11-
use std::os;
12-
use std::str;
1311
use std::io::process::{ProcessExit, Command, Process, ProcessOutput};
1412
use std::dynamic_lib::DynamicLibrary;
1513

16-
fn target_env(lib_path: &str, aux_path: Option<&str>) -> Vec<(String, String)> {
14+
fn add_target_env(cmd: &mut Command, lib_path: &str, aux_path: Option<&str>) {
1715
// Need to be sure to put both the lib_path and the aux path in the dylib
1816
// search path for the child.
1917
let mut path = DynamicLibrary::search_path();
@@ -23,19 +21,11 @@ fn target_env(lib_path: &str, aux_path: Option<&str>) -> Vec<(String, String)> {
2321
}
2422
path.insert(0, Path::new(lib_path));
2523

26-
// Remove the previous dylib search path var
27-
let var = DynamicLibrary::envvar();
28-
let mut env: Vec<(String,String)> = os::env();
29-
match env.iter().position(|&(ref k, _)| k.as_slice() == var) {
30-
Some(i) => { env.remove(i); }
31-
None => {}
32-
}
33-
3424
// Add the new dylib search path var
25+
let var = DynamicLibrary::envvar();
3526
let newpath = DynamicLibrary::create_path(path.as_slice());
36-
let newpath = str::from_utf8(newpath.as_slice()).unwrap().to_string();
37-
env.push((var.to_string(), newpath));
38-
return env;
27+
let newpath = String::from_utf8(newpath).unwrap();
28+
cmd.env(var.to_string(), newpath);
3929
}
4030

4131
pub struct Result {pub status: ProcessExit, pub out: String, pub err: String}
@@ -47,8 +37,14 @@ pub fn run(lib_path: &str,
4737
env: Vec<(String, String)> ,
4838
input: Option<String>) -> Option<Result> {
4939

50-
let env = env.clone().append(target_env(lib_path, aux_path).as_slice());
51-
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
40+
let mut cmd = Command::new(prog);
41+
cmd.args(args);
42+
add_target_env(&mut cmd, lib_path, aux_path);
43+
for (key, val) in env.move_iter() {
44+
cmd.env(key, val);
45+
}
46+
47+
match cmd.spawn() {
5248
Ok(mut process) => {
5349
for input in input.iter() {
5450
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();
@@ -58,8 +54,8 @@ pub fn run(lib_path: &str,
5854

5955
Some(Result {
6056
status: status,
61-
out: str::from_utf8(output.as_slice()).unwrap().to_string(),
62-
err: str::from_utf8(error.as_slice()).unwrap().to_string()
57+
out: String::from_utf8(output).unwrap(),
58+
err: String::from_utf8(error).unwrap()
6359
})
6460
},
6561
Err(..) => None
@@ -73,8 +69,14 @@ pub fn run_background(lib_path: &str,
7369
env: Vec<(String, String)> ,
7470
input: Option<String>) -> Option<Process> {
7571

76-
let env = env.clone().append(target_env(lib_path, aux_path).as_slice());
77-
match Command::new(prog).args(args).env(env.as_slice()).spawn() {
72+
let mut cmd = Command::new(prog);
73+
cmd.args(args);
74+
add_target_env(&mut cmd, lib_path, aux_path);
75+
for (key, val) in env.move_iter() {
76+
cmd.env(key, val);
77+
}
78+
79+
match cmd.spawn() {
7880
Ok(mut process) => {
7981
for input in input.iter() {
8082
process.stdin.get_mut_ref().write(input.as_bytes()).unwrap();

branches/try/src/compiletest/runtest.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
158158
match props.pp_exact { Some(_) => 1, None => 2 };
159159

160160
let src = File::open(testfile).read_to_end().unwrap();
161-
let src = str::from_utf8(src.as_slice()).unwrap().to_string();
161+
let src = String::from_utf8(src.clone()).unwrap();
162162
let mut srcs = vec!(src);
163163

164164
let mut round = 0;
@@ -185,10 +185,10 @@ fn run_pretty_test(config: &Config, props: &TestProps, testfile: &Path) {
185185
Some(ref file) => {
186186
let filepath = testfile.dir_path().join(file);
187187
let s = File::open(&filepath).read_to_end().unwrap();
188-
str::from_utf8(s.as_slice()).unwrap().to_string()
189-
}
190-
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191-
};
188+
String::from_utf8(s).unwrap()
189+
}
190+
None => { (*srcs.get(srcs.len() - 2u)).clone() }
191+
};
192192
let mut actual = (*srcs.get(srcs.len() - 1u)).clone();
193193

194194
if props.pp_exact.is_some() {
@@ -574,16 +574,16 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
574574
cmd.arg("./src/etc/lldb_batchmode.py")
575575
.arg(test_executable)
576576
.arg(debugger_script)
577-
.env([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
577+
.env_set_all([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);
578578

579579
let (status, out, err) = match cmd.spawn() {
580580
Ok(process) => {
581581
let ProcessOutput { status, output, error } =
582582
process.wait_with_output().unwrap();
583583

584584
(status,
585-
str::from_utf8(output.as_slice()).unwrap().to_string(),
586-
str::from_utf8(error.as_slice()).unwrap().to_string())
585+
String::from_utf8(output).unwrap(),
586+
String::from_utf8(error).unwrap())
587587
},
588588
Err(e) => {
589589
fatal(format!("Failed to setup Python process for \
@@ -813,7 +813,7 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
813813
c
814814
}
815815
} ).collect();
816-
str::from_chars(c.as_slice()).to_string()
816+
String::from_chars(c.as_slice())
817817
}
818818

819819
#[cfg(target_os = "win32")]

0 commit comments

Comments
 (0)