Skip to content

Commit b0b0150

Browse files
committed
---
yaml --- r: 273855 b: refs/heads/beta c: 08ca5d9 h: refs/heads/master i: 273853: 8e068c7 273851: b6de95b 273847: ebc2ee4 273839: e7ec5a9 273823: 099f943 273791: 9efe71e
1 parent 6c53796 commit b0b0150

File tree

404 files changed

+3310
-3540
lines changed

Some content is hidden

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

404 files changed

+3310
-3540
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 1af79cf34e1fd6f38ba256631e2997ca650e490b
26+
refs/heads/beta: 08ca5d955832ee412250a776ce811c9d6abf2100
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/COMPILER_TESTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ fn test_foo() {
7777
}
7878
```
7979

80-
Note that not all headers have meaning when customized to a revision.
80+
Note that not all headers have meaning when customized too a revision.
8181
For example, the `ignore-test` header (and all "ignore" headers)
8282
currently only apply to the test as a whole, not to particular
8383
revisions. The only headers that are intended to really work when

branches/beta/CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ which includes important information about what platform you're on, what
7171
version of Rust you're using, etc.
7272

7373
Sometimes, a backtrace is helpful, and so including that is nice. To get
74-
a backtrace, set the `RUST_BACKTRACE` environment variable to a value
75-
other than `0`. The easiest way
74+
a backtrace, set the `RUST_BACKTRACE` environment variable. The easiest way
7675
to do this is to invoke `rustc` like this:
7776

7877
```bash

branches/beta/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,10 @@ To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
177177
Rust has an [IRC] culture and most real-time collaboration happens in a
178178
variety of channels on Mozilla's IRC network, irc.mozilla.org. The
179179
most popular channel is [#rust], a venue for general discussion about
180-
Rust. And a good place to ask for help would be [#rust-beginners].
180+
Rust, and a good place to ask for help.
181181
182182
[IRC]: https://en.wikipedia.org/wiki/Internet_Relay_Chat
183183
[#rust]: irc://irc.mozilla.org/rust
184-
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
185184
186185
## License
187186

branches/beta/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12521252
bits=x86_64
12531253
msvc_part=amd64
12541254
;;
1255-
i*86-*)
1255+
i686-*)
12561256
bits=i386
12571257
msvc_part=
12581258
;;

branches/beta/man/rustc.1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,15 @@ the maximum number of threads used for this purpose.
268268

269269
.TP
270270
\fBRUST_TEST_NOCAPTURE\fR
271-
If set to a value other than "0", a synonym for the --nocapture flag.
271+
A synonym for the --nocapture flag.
272272

273273
.TP
274274
\fBRUST_MIN_STACK\fR
275275
Sets the minimum stack size for new threads.
276276

277277
.TP
278278
\fBRUST_BACKTRACE\fR
279-
If set to a value different than "0", produces a backtrace in the output of a program which panics.
279+
If set, produces a backtrace in the output of a program which panics.
280280

281281
.SH "EXAMPLES"
282282
To build an executable from a source file with a main function:

branches/beta/mk/crates.mk

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics \
6060
rustc_plugin rustc_metadata rustc_passes rustc_save_analysis \
61-
rustc_const_eval rustc_const_math
61+
rustc_const_eval
6262
HOST_CRATES := syntax syntax_ext $(RUSTC_CRATES) rustdoc fmt_macros \
6363
flate arena graphviz rbml log serialize
6464
TOOLS := compiletest rustdoc rustc rustbook error_index_generator
@@ -92,39 +92,36 @@ DEPS_test := std getopts term native:rust_test_helpers
9292
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
9393
DEPS_syntax_ext := syntax fmt_macros
9494

95-
DEPS_rustc_const_math := std syntax log serialize
96-
DEPS_rustc_const_eval := rustc_const_math rustc syntax log serialize rustc_front \
97-
rustc_back graphviz
95+
DEPS_rustc_const_eval := std syntax
9896

9997
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
10098
log graphviz rustc_back rustc_data_structures\
101-
rustc_const_math
99+
rustc_const_eval
102100
DEPS_rustc_back := std syntax rustc_front flate log libc
103101
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
104102
DEPS_rustc_data_structures := std log serialize
105103
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
106104
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
107105
rustc_trans rustc_privacy rustc_lint rustc_front rustc_plugin \
108-
rustc_metadata syntax_ext rustc_passes rustc_save_analysis rustc_const_eval
106+
rustc_metadata syntax_ext rustc_passes rustc_save_analysis
109107
DEPS_rustc_front := std syntax log serialize
110-
DEPS_rustc_lint := rustc log syntax rustc_const_eval
108+
DEPS_rustc_lint := rustc log syntax
111109
DEPS_rustc_llvm := native:rustllvm libc std rustc_bitflags
112-
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_math
113-
DEPS_rustc_passes := syntax rustc core rustc_front rustc_const_eval
114-
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_math rustc_const_eval
110+
DEPS_rustc_metadata := rustc rustc_front syntax rbml rustc_const_eval
111+
DEPS_rustc_passes := syntax rustc core rustc_front
112+
DEPS_rustc_mir := rustc rustc_front syntax rustc_const_eval
115113
DEPS_rustc_resolve := arena rustc rustc_front log syntax
116114
DEPS_rustc_platform_intrinsics := std
117115
DEPS_rustc_plugin := rustc rustc_metadata syntax rustc_mir
118116
DEPS_rustc_privacy := rustc rustc_front log syntax
119117
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back rustc_mir \
120118
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics \
121-
rustc_const_math rustc_const_eval
119+
rustc_const_eval
122120
DEPS_rustc_save_analysis := rustc log syntax rustc_front
123-
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_math \
124-
rustc_const_eval
121+
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics rustc_const_eval
125122

126123
DEPS_rustdoc := rustc rustc_driver native:hoedown serialize getopts \
127-
test rustc_lint rustc_front rustc_const_eval
124+
test rustc_lint rustc_front
128125

129126

130127
TOOL_DEPS_compiletest := test getopts log

branches/beta/mk/main.mk

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ endif
493493
LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3) := \
494494
$$(CURDIR)/$$(HLIB$(1)_H_$(3)):$$(CFG_LLVM_INST_DIR_$(3))/lib
495495
LD_LIBRARY_PATH_ENV_TARGETDIR$(1)_T_$(2)_H_$(3) := \
496-
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(3))
496+
$$(CURDIR)/$$(TLIB$(1)_T_$(2)_H_$(CFG_BUILD))
497497

498498
HOST_RPATH_VAR$(1)_T_$(2)_H_$(3) := \
499499
$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))=$$(LD_LIBRARY_PATH_ENV_HOSTDIR$(1)_T_$(2)_H_$(3)):$$$$$$(LD_LIBRARY_PATH_ENV_NAME$(1)_T_$(2)_H_$(3))
@@ -506,14 +506,18 @@ RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(HOST_RPATH_VAR$(1)_T_$(2)_H_$(3))
506506
# if you're building a cross config, the host->* parts are
507507
# effectively stage1, since it uses the just-built stage0.
508508
#
509-
# Also be sure to use the right rpath because we're loading libraries from the
510-
# CFG_BUILD's stage1 directory for our target, so switch this one instance of
511-
# `RPATH_VAR` to get the bootstrap working.
509+
# This logic is similar to how the LD_LIBRARY_PATH variable must
510+
# change be slightly different when doing cross compilations.
511+
# The build doesn't copy over all target libraries into
512+
# a new directory, so we need to point the library path at
513+
# the build directory where all the target libraries came
514+
# from (the stage0 build host). Otherwise the relative rpaths
515+
# inside of the rustc binary won't get resolved correctly.
512516
ifeq ($(1),0)
513517
ifneq ($(strip $(CFG_BUILD)),$(strip $(3)))
514518
CFGFLAG$(1)_T_$(2)_H_$(3) = stage1
515519

516-
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR1_T_$(2)_H_$$(CFG_BUILD))
520+
RPATH_VAR$(1)_T_$(2)_H_$(3) := $$(TARGET_RPATH_VAR$(1)_T_$(2)_H_$(3))
517521
endif
518522
endif
519523

branches/beta/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236236
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237237

238238
ifeq ($$(findstring msvc,$(1)),msvc)
239-
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$$(CFG_BUILD))
239+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS) $$(MKFILE_DEPS) $$(LLVM_CONFIG_$(1))
240240
@$$(call E, cmake: compiler-rt)
241241
$$(Q)cd "$$(COMPRT_BUILD_DIR_$(1))"; $$(CFG_CMAKE) "$(S)src/compiler-rt" \
242242
-DCMAKE_BUILD_TYPE=$$(LLVM_BUILD_CONFIG_MODE) \
243-
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$$(CFG_BUILD)) \
243+
-DLLVM_CONFIG_PATH=$$(LLVM_CONFIG_$(1)) \
244244
-G"$$(CFG_CMAKE_GENERATOR)"
245245
$$(Q)$$(CFG_CMAKE) --build "$$(COMPRT_BUILD_DIR_$(1))" \
246246
--target lib/builtins/builtins \

branches/beta/src/bootstrap/build/compile.rs

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -123,38 +123,6 @@ fn build_startup_objects(build: &Build, target: &str, into: &Path) {
123123
}
124124
}
125125

126-
/// Build libtest.
127-
///
128-
/// This will build libtest and supporting libraries for a particular stage of
129-
/// the build using the `compiler` targeting the `target` architecture. The
130-
/// artifacts created will also be linked into the sysroot directory.
131-
pub fn test<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
132-
println!("Building stage{} test artifacts ({} -> {})", compiler.stage,
133-
compiler.host, target);
134-
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
135-
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
136-
let mut cargo = build.cargo(compiler, Mode::Libtest, target, "build");
137-
cargo.arg("--manifest-path")
138-
.arg(build.src.join("src/rustc/test_shim/Cargo.toml"));
139-
build.run(&mut cargo);
140-
test_link(build, target, compiler, compiler.host);
141-
}
142-
143-
/// Link all libtest rlibs/dylibs into the sysroot location.
144-
///
145-
/// Links those artifacts generated in the given `stage` for `target` produced
146-
/// by `compiler` into `host`'s sysroot.
147-
pub fn test_link(build: &Build,
148-
target: &str,
149-
compiler: &Compiler,
150-
host: &str) {
151-
let target_compiler = Compiler::new(compiler.stage, host);
152-
let libdir = build.sysroot_libdir(&target_compiler, target);
153-
let out_dir = build.cargo_out(compiler, Mode::Libtest, target);
154-
add_to_sysroot(&out_dir, &libdir);
155-
}
156-
157-
158126
/// Build the compiler.
159127
///
160128
/// This will build the compiler for a particular stage of the build using
@@ -165,7 +133,7 @@ pub fn rustc<'a>(build: &'a Build, target: &str, compiler: &Compiler<'a>) {
165133
compiler.stage, compiler.host, target);
166134

167135
let out_dir = build.cargo_out(compiler, Mode::Librustc, target);
168-
build.clear_if_dirty(&out_dir, &libtest_shim(build, compiler, target));
136+
build.clear_if_dirty(&out_dir, &libstd_shim(build, compiler, target));
169137

170138
let mut cargo = build.cargo(compiler, Mode::Librustc, target, "build");
171139
cargo.arg("--features").arg(build.rustc_features())
@@ -234,12 +202,6 @@ fn libstd_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
234202
build.cargo_out(compiler, Mode::Libstd, target).join("libstd_shim.rlib")
235203
}
236204

237-
/// Cargo's output path for libtest in a given stage, compiled by a particular
238-
/// compiler for the specified target.
239-
fn libtest_shim(build: &Build, compiler: &Compiler, target: &str) -> PathBuf {
240-
build.cargo_out(compiler, Mode::Libtest, target).join("libtest_shim.rlib")
241-
}
242-
243205
fn compiler_file(compiler: &Path, file: &str) -> String {
244206
output(Command::new(compiler)
245207
.arg(format!("-print-file-name={}", file))).trim().to_string()

branches/beta/src/bootstrap/build/doc.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,6 @@ pub fn std(build: &Build, stage: u32, host: &str, out: &Path) {
122122
cp_r(&out_dir, out)
123123
}
124124

125-
pub fn test(build: &Build, stage: u32, host: &str, out: &Path) {
126-
println!("Documenting stage{} test ({})", stage, host);
127-
let compiler = Compiler::new(stage, host);
128-
let out_dir = build.stage_out(&compiler, Mode::Libtest)
129-
.join(host).join("doc");
130-
let rustdoc = build.rustdoc(&compiler);
131-
132-
build.clear_if_dirty(&out_dir, &rustdoc);
133-
134-
let mut cargo = build.cargo(&compiler, Mode::Libtest, host, "doc");
135-
cargo.arg("--manifest-path")
136-
.arg(build.src.join("src/rustc/test_shim/Cargo.toml"));
137-
build.run(&mut cargo);
138-
cp_r(&out_dir, out)
139-
}
140-
141125
pub fn rustc(build: &Build, stage: u32, host: &str, out: &Path) {
142126
println!("Documenting stage{} compiler ({})", stage, host);
143127
let compiler = Compiler::new(stage, host);

branches/beta/src/bootstrap/build/mod.rs

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ pub struct Build {
8888

8989
pub enum Mode {
9090
Libstd,
91-
Libtest,
9291
Librustc,
9392
Tool,
9493
}
@@ -142,13 +141,9 @@ impl Build {
142141
return clean::clean(self);
143142
}
144143

145-
self.verbose("finding compilers");
146144
cc::find(self);
147-
self.verbose("running sanity check");
148145
sanity::check(self);
149-
self.verbose("collecting channel variables");
150146
channel::collect(self);
151-
self.verbose("updating submodules");
152147
self.update_submodules();
153148

154149
for target in step::all(self) {
@@ -163,18 +158,12 @@ impl Build {
163158
Libstd { compiler } => {
164159
compile::std(self, target.target, &compiler);
165160
}
166-
Libtest { compiler } => {
167-
compile::test(self, target.target, &compiler);
168-
}
169161
Librustc { compiler } => {
170162
compile::rustc(self, target.target, &compiler);
171163
}
172164
LibstdLink { compiler, host } => {
173165
compile::std_link(self, target.target, &compiler, host);
174166
}
175-
LibtestLink { compiler, host } => {
176-
compile::test_link(self, target.target, &compiler, host);
177-
}
178167
LibrustcLink { compiler, host } => {
179168
compile::rustc_link(self, target.target, &compiler, host);
180169
}
@@ -214,9 +203,6 @@ impl Build {
214203
DocStd { stage } => {
215204
doc::std(self, stage, target.target, &doc_out);
216205
}
217-
DocTest { stage } => {
218-
doc::test(self, stage, target.target, &doc_out);
219-
}
220206
DocRustc { stage } => {
221207
doc::rustc(self, stage, target.target, &doc_out);
222208
}
@@ -326,7 +312,13 @@ impl Build {
326312
if !target.contains("msvc") {
327313
cargo.env(format!("CC_{}", target), self.cc(target))
328314
.env(format!("AR_{}", target), self.ar(target))
329-
.env(format!("CFLAGS_{}", target), self.cflags(target));
315+
.env(format!("CFLAGS_{}", target), self.cflags(target).join(" "));
316+
}
317+
318+
// If we're building for OSX, inform the compiler and the linker that
319+
// we want to build a compiler runnable on 10.7
320+
if target.contains("apple-darwin") {
321+
cargo.env("MACOSX_DEPLOYMENT_TARGET", "10.7");
330322
}
331323

332324
// Environment variables *required* needed throughout the build
@@ -374,7 +366,6 @@ impl Build {
374366
let host = compiler.host;
375367
let paths = vec![
376368
self.cargo_out(compiler, Mode::Libstd, host).join("deps"),
377-
self.cargo_out(compiler, Mode::Libtest, host).join("deps"),
378369
self.cargo_out(compiler, Mode::Librustc, host).join("deps"),
379370
];
380371
add_lib_path(paths, &mut cmd);
@@ -429,8 +420,7 @@ impl Build {
429420
fn stage_out(&self, compiler: &Compiler, mode: Mode) -> PathBuf {
430421
let suffix = match mode {
431422
Mode::Libstd => "-std",
432-
Mode::Libtest => "-test",
433-
Mode::Tool | Mode::Librustc => "-rustc",
423+
_ => "-rustc",
434424
};
435425
self.out.join(compiler.host)
436426
.join(format!("stage{}{}", compiler.stage, suffix))
@@ -497,11 +487,20 @@ impl Build {
497487
self.cc[target].0.path()
498488
}
499489

500-
fn cflags(&self, target: &str) -> String {
501-
self.cc[target].0.args().iter()
502-
.map(|s| s.to_string_lossy())
503-
.collect::<Vec<_>>()
504-
.join(" ")
490+
fn cflags(&self, target: &str) -> Vec<String> {
491+
let mut base = self.cc[target].0.args().iter()
492+
.map(|s| s.to_string_lossy().into_owned())
493+
.collect::<Vec<_>>();
494+
495+
// If we're compiling on OSX then we add a few unconditional flags
496+
// indicating that we want libc++ (more filled out than libstdc++) and
497+
// we want to compile for 10.7. This way we can ensure that
498+
// LLVM/jemalloc/etc are all properly compiled.
499+
if target.contains("apple-darwin") {
500+
base.push("-stdlib=libc++".into());
501+
base.push("-mmacosx-version-min=10.7".into());
502+
}
503+
return base
505504
}
506505

507506
fn ar(&self, target: &str) -> &Path {

branches/beta/src/bootstrap/build/native.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ pub fn llvm(build: &Build, target: &str) {
8686
.define("CMAKE_CXX_COMPILER", build.cxx(target));
8787
}
8888
cfg.build_arg("-j").build_arg(build.jobs().to_string());
89+
90+
cfg.define("CMAKE_C_FLAGS", build.cflags(target).join(" "));
91+
cfg.define("CMAKE_CXX_FLAGS", build.cflags(target).join(" "));
8992
}
9093

9194
// FIXME: we don't actually need to build all LLVM tools and all LLVM

0 commit comments

Comments
 (0)