Skip to content

Commit 6ab30bd

Browse files
committed
---
yaml --- r: 108223 b: refs/heads/dist-snap c: db264b4 h: refs/heads/master i: 108221: 23a9110 108219: 7c76d2e 108215: 15cf492 108207: db3985c 108191: 71f3dbf 108159: 6d1f1cf v: v3
1 parent 3e7338e commit 6ab30bd

File tree

684 files changed

+6772
-4831
lines changed

Some content is hidden

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

684 files changed

+6772
-4831
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: f64fdf524a434f0e5cd0bc91d09c144723f3c90d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: 56ca5f837e1f9ba1017bc5b9b84f42425e1e3a1e
9+
refs/heads/dist-snap: db264b4a70c4153121340eba96bbbd7797102061
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@
99
[submodule "src/gyp"]
1010
path = src/gyp
1111
url = https://github.com/rust-lang/gyp.git
12+
[submodule "src/compiler-rt"]
13+
path = src/compiler-rt
14+
url = https://github.com/rust-lang/compiler-rt.git

branches/dist-snap/Makefile.in

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ endif
140140
# snapshot will be generated with a statically linked rustc so we only have to
141141
# worry about the distribution of one file (with its native dynamic
142142
# dependencies)
143-
RUSTFLAGS_STAGE0 += -Z prefer-dynamic
143+
#
144+
# NOTE: after a snapshot (stage0), put this on stage0 as well
144145
RUSTFLAGS_STAGE1 += -C prefer-dynamic
145146

146147
# platform-specific auto-configuration
@@ -354,7 +355,8 @@ endif
354355
# Prerequisites for using the stageN compiler to build target artifacts
355356
TSREQ$(1)_T_$(2)_H_$(3) = \
356357
$$(HSREQ$(1)_H_$(3)) \
357-
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
358+
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a \
359+
$$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
358360

359361
# Prerequisites for a working stageN compiler and libraries, for a specific
360362
# target

branches/dist-snap/mk/clean.mk

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ clean-generic-$(2)-$(1):
5454
$(1)/rt \
5555
$(1)/test \
5656
$(1)/stage* \
57+
-type f \( \
5758
-name '*.[odasS]' -o \
5859
-name '*.so' -o \
5960
-name '*.dylib' -o \
@@ -62,6 +63,7 @@ clean-generic-$(2)-$(1):
6263
-name '*.dll' -o \
6364
-name '*.def' -o \
6465
-name '*.bc' \
66+
\) \
6567
| xargs rm -f
6668
$(Q)find $(1)\
6769
-name '*.dSYM' \
@@ -96,6 +98,7 @@ clean$(1)_T_$(2)_H_$(3): \
9698
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
9799
$$(foreach tool,$$(TOOLS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
98100
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
101+
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
99102
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix
100103
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/run_pass_stage* # For windows
101104

branches/dist-snap/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ HOST_CRATES := syntax rustc rustdoc fourcc
5555
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5656
TOOLS := compiletest rustdoc rustc
5757

58-
DEPS_std := native:rustrt
58+
DEPS_std := native:rustrt native:compiler-rt
5959
DEPS_extra := std term sync serialize getopts collections
6060
DEPS_green := std
6161
DEPS_rustuv := std native:uv native:uv_support

branches/dist-snap/mk/install.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ install-target-$(1)-host-$(2): \
9696
$$(call INSTALL_LIB,$$(call CFG_LIB_GLOB_$(1),$$(crate)));\
9797
$$(call INSTALL_LIB,$$(call CFG_RLIB_GLOB,$$(crate)));)
9898
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
99+
$$(Q)$$(call INSTALL_LIB,libcompiler-rt.a)
99100

100101
endef
101102

@@ -110,6 +111,7 @@ install-target-$(1)-host-$(2): $$(CSREQ$$(ISTAGE)_T_$(1)_H_$(2))
110111
$$(Q)$$(foreach crate,$$(TARGET_CRATES),\
111112
$$(call INSTALL_LIB,$$(call CFG_RLIB_GLOB,$$(crate)));)
112113
$$(Q)$$(call INSTALL_LIB,libmorestack.a)
114+
$$(Q)$$(call INSTALL_LIB,libcompiler-rt.a)
113115
endef
114116

115117
$(foreach target,$(CFG_TARGET), \

branches/dist-snap/mk/rt.mk

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,37 @@ $$(LIBUV_DIR_$(1))/Release/libuv.a: $$(LIBUV_DEPS) $$(LIBUV_MAKEFILE_$(1)) \
217217

218218
endif
219219

220+
################################################################################
221+
# compiler-rt
222+
################################################################################
223+
224+
ifdef CFG_ENABLE_FAST_MAKE
225+
COMPRT_DEPS := $(S)/.gitmodules
226+
else
227+
COMPRT_DEPS := $(wildcard \
228+
$(S)src/compiler-rt/* \
229+
$(S)src/compiler-rt/*/* \
230+
$(S)src/compiler-rt/*/*/* \
231+
$(S)src/compiler-rt/*/*/*/*)
232+
endif
233+
234+
COMPRT_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),compiler-rt)
235+
COMPRT_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(COMPRT_NAME_$(1))
236+
COMPRT_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/compiler-rt
237+
238+
$$(COMPRT_LIB_$(1)): $$(COMPRT_DEPS)
239+
@$$(call E, make: compiler-rt)
240+
$$(Q)$$(MAKE) -C "$(S)src/compiler-rt" \
241+
ProjSrcRoot="$(S)src/compiler-rt" \
242+
ProjObjRoot="$$(abspath $$(COMPRT_BUILD_DIR_$(1)))" \
243+
CC="$$(CC_$(1))" \
244+
AR="$$(AR_$(1))" \
245+
RANLIB="$$(AR_$(1)) s" \
246+
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1))" \
247+
TargetTriple=$(1) \
248+
triple-runtime
249+
$$(Q)cp $$(COMPRT_BUILD_DIR_$(1))/triple/runtime/libcompiler_rt.a $$(COMPRT_LIB_$(1))
250+
220251
endef
221252

222253
# Instantiate template for all stages/targets

branches/dist-snap/mk/target.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ $$(TBIN$(1)_T_$(2)_H_$(3))/:
138138
$$(TLIB$(1)_T_$(2)_H_$(3))/:
139139
mkdir -p $$@
140140

141+
$$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a: \
142+
$$(RT_OUTPUT_DIR_$(2))/$$(call CFG_STATIC_LIB_NAME_$(2),compiler-rt) \
143+
| $$(TLIB$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)
144+
@$$(call E, cp: $$@)
145+
$$(Q)cp $$< $$@
146+
141147
$$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a: \
142148
$$(RT_OUTPUT_DIR_$(2))/$$(call CFG_STATIC_LIB_NAME_$(2),morestack) \
143149
| $$(TLIB$(1)_T_$(2)_H_$(3))/ $$(SNAPSHOT_RUSTC_POST_CLEANUP)

branches/dist-snap/mk/tests.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ ifdef TESTNAME
3434
TESTARGS += $(TESTNAME)
3535
endif
3636

37-
ifdef CHECK_XFAILS
37+
ifdef CHECK_IGNORED
3838
TESTARGS += --ignored
3939
endif
4040

@@ -262,6 +262,7 @@ tidy:
262262
| grep '^$(S)src/gyp' -v \
263263
| grep '^$(S)src/etc' -v \
264264
| grep '^$(S)src/doc' -v \
265+
| grep '^$(S)src/compiler-rt' -v \
265266
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
266267

267268
endif

branches/dist-snap/src/compiler-rt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit d4606f1818dd8dfeaa3e509cd1cbac4482c3513e

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub fn parse_config(args: ~[~str]) -> config {
6161
reqopt("", "stage-id", "the target-stage identifier", "stageN-TARGET"),
6262
reqopt("", "mode", "which sort of compile tests to run",
6363
"(compile-fail|run-fail|run-pass|pretty|debug-info)"),
64-
optflag("", "ignored", "run tests marked as ignored / xfailed"),
64+
optflag("", "ignored", "run tests marked as ignored"),
6565
optopt("", "runtool", "supervisor program to run tests under \
6666
(eg. emulator, valgrind)", "PROGRAM"),
6767
optopt("", "rustcflags", "flags to pass to rustc", "FLAGS"),

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ pub fn load_props(testfile: &Path) -> TestProps {
9595
}
9696

9797
pub fn is_test_ignored(config: &config, testfile: &Path) -> bool {
98-
fn xfail_target(config: &config) -> ~str {
99-
~"xfail-" + util::get_os(config.target)
98+
fn ignore_target(config: &config) -> ~str {
99+
~"ignore-" + util::get_os(config.target)
100100
}
101-
fn xfail_stage(config: &config) -> ~str {
102-
~"xfail-" + config.stage_id.split('-').next().unwrap()
101+
fn ignore_stage(config: &config) -> ~str {
102+
~"ignore-" + config.stage_id.split('-').next().unwrap()
103103
}
104104
105105
let val = iter_header(testfile, |ln| {
106-
if parse_name_directive(ln, "xfail-test") { false }
107-
else if parse_name_directive(ln, xfail_target(config)) { false }
108-
else if parse_name_directive(ln, xfail_stage(config)) { false }
106+
if parse_name_directive(ln, "ignore-test") { false }
107+
else if parse_name_directive(ln, ignore_target(config)) { false }
108+
else if parse_name_directive(ln, ignore_stage(config)) { false }
109109
else if config.mode == common::mode_pretty &&
110-
parse_name_directive(ln, "xfail-pretty") { false }
110+
parse_name_directive(ln, "ignore-pretty") { false }
111111
else { true }
112112
});
113113

branches/dist-snap/src/doc/guide-container.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -181,19 +181,25 @@ never call its underlying iterator again once `None` has been returned:
181181
~~~
182182
let xs = [1,2,3,4,5];
183183
let mut calls = 0;
184-
let it = xs.iter().scan((), |_, x| {
185-
calls += 1;
186-
if *x < 3 { Some(x) } else { None }});
187-
// the iterator will only yield 1 and 2 before returning None
188-
// If we were to call it 5 times, calls would end up as 5, despite only 2 values
189-
// being yielded (and therefore 3 unique calls being made). The fuse() adaptor
190-
// can fix this.
191-
let mut it = it.fuse();
192-
it.next();
193-
it.next();
194-
it.next();
195-
it.next();
196-
it.next();
184+
185+
{
186+
let it = xs.iter().scan((), |_, x| {
187+
calls += 1;
188+
if *x < 3 { Some(x) } else { None }});
189+
190+
// the iterator will only yield 1 and 2 before returning None
191+
// If we were to call it 5 times, calls would end up as 5, despite
192+
// only 2 values being yielded (and therefore 3 unique calls being
193+
// made). The fuse() adaptor can fix this.
194+
195+
let mut it = it.fuse();
196+
it.next();
197+
it.next();
198+
it.next();
199+
it.next();
200+
it.next();
201+
}
202+
197203
assert_eq!(calls, 3);
198204
~~~
199205

branches/dist-snap/src/doc/guide-tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Instead we can use a `SharedChan`, a type that allows a single
232232
~~~
233233
# use std::task::spawn;
234234
235-
let (port, chan) = SharedChan::new();
235+
let (port, chan) = Chan::new();
236236
237237
for init_val in range(0u, 3) {
238238
// Create a new channel handle to distribute to the child task

branches/dist-snap/src/doc/tutorial.md

Lines changed: 34 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2679,25 +2679,24 @@ manual.
26792679

26802680
## Files and modules
26812681

2682-
One important aspect about Rusts module system is that source files are not important:
2683-
You define a module hierarchy, populate it with all your definitions, define visibility,
2684-
maybe put in a `fn main()`, and that's it: No need to think about source files.
2682+
One important aspect of Rust's module system is that source files and modules are not the same thing. You define a module hierarchy, populate it with all your definitions, define visibility, maybe put in a `fn main()`, and that's it.
26852683

2686-
The only file that's relevant is the one that contains the body of your crate root,
2687-
and it's only relevant because you have to pass that file to `rustc` to compile your crate.
2684+
The only file that's relevant when compiling is the one that contains the body
2685+
of your crate root, and it's only relevant because you have to pass that file
2686+
to `rustc` to compile your crate.
26882687

2689-
And in principle, that's all you need: You can write any Rust program as one giant source file that contains your
2690-
crate root and everything below it in `mod ... { ... }` declarations.
2688+
In principle, that's all you need: You can write any Rust program as one giant source file that contains your
2689+
crate root and everything else in `mod ... { ... }` declarations.
26912690

2692-
However, in practice you usually want to split you code up into multiple source files to make it more manageable.
2693-
In order to do that, Rust allows you to move the body of any module into it's own source file, which works like this:
2691+
However, in practice you usually want to split up your code into multiple
2692+
source files to make it more manageable. Rust allows you to move the body of
2693+
any module into its own source file. If you declare a module without its body,
2694+
like `mod foo;`, the compiler will look for the files `foo.rs` and `foo/mod.rs`
2695+
inside some directory (usually the same as of the source file containing the
2696+
`mod foo;` declaration). If it finds either, it uses the content of that file
2697+
as the body of the module. If it finds both, that's a compile error.
26942698

2695-
If you declare a module without its body, like `mod foo;`, the compiler will look for the
2696-
files `foo.rs` and `foo/mod.rs` inside some directory (usually the same as of the source file containing
2697-
the `mod foo;`). If it finds either, it uses the content of that file as the body of the module.
2698-
If it finds both, that's a compile error.
2699-
2700-
So, if we want to move the content of `mod farm` into it's own file, it would look like this:
2699+
To move the content of `mod farm` into its own file, you can write:
27012700

27022701
~~~~ {.ignore}
27032702
// `main.rs` - contains body of the crate root
@@ -2722,17 +2721,13 @@ pub mod barn {
27222721

27232722
In short, `mod foo;` is just syntactic sugar for `mod foo { /* content of <...>/foo.rs or <...>/foo/mod.rs */ }`.
27242723

2725-
This also means that having two or more identical `mod foo;` somewhere
2726-
in your crate hierarchy is generally a bad idea,
2727-
just like copy-and-paste-ing a module into two or more places is one.
2724+
This also means that having two or more identical `mod foo;` declarations somewhere in your crate hierarchy is generally a bad idea,
2725+
just like copy-and-paste-ing a module into multiple places is a bad idea.
27282726
Both will result in duplicate and mutually incompatible definitions.
27292727

2730-
The directory the compiler looks in for those two files is determined by starting with
2731-
the same directory as the source file that contains the `mod foo;` declaration, and concatenating to that a
2732-
path equivalent to the relative path of all nested `mod { ... }` declarations the `mod foo;`
2733-
is contained in, if any.
2734-
2735-
For example, given a file with this module body:
2728+
When `rustc` resolves these module declarations, it starts by looking in the
2729+
parent directory of the file containing the `mod foo` declaration. For example,
2730+
given a file with the module body:
27362731

27372732
~~~ {.ignore}
27382733
// `src/main.rs`
@@ -2745,7 +2740,7 @@ mod animals {
27452740
}
27462741
~~~
27472742

2748-
The compiler would then try all these files:
2743+
The compiler will look for these files, in this order:
27492744

27502745
~~~ {.notrust}
27512746
src/plants.rs
@@ -2758,9 +2753,9 @@ src/animals/mammals/humans.rs
27582753
src/animals/mammals/humans/mod.rs
27592754
~~~
27602755

2761-
Keep in mind that identical module hierachies can still lead to different path lookups
2762-
depending on how and where you've moved a module body to its own file.
2763-
For example, if we move the `animals` module above into its own file...
2756+
Keep in mind that identical module hierarchies can still lead to different path
2757+
lookups depending on how and where you've moved a module body to its own file.
2758+
For example, if you move the `animals` module into its own file:
27642759

27652760
~~~ {.ignore}
27662761
// `src/main.rs`
@@ -2776,21 +2771,21 @@ mod mammals {
27762771
}
27772772
~~~
27782773

2779-
...then the source files of `mod animals`'s submodules can
2780-
either be placed right next to that of its parents, or in a subdirectory if `animals` source file is:
2774+
...then the source files of `mod animals`'s submodules can either be in the same directory as the animals source file or in a subdirectory of its directory. If the animals file is `src/animals.rs`, `rustc` will look for:
27812775

27822776
~~~ {.notrust}
2783-
src/plants.rs
2784-
src/plants/mod.rs
2785-
2786-
src/animals.rs - if file sits next to that of parent module's:
2777+
src/animals.rs
27872778
src/fish.rs
27882779
src/fish/mod.rs
27892780
27902781
src/mammals/humans.rs
27912782
src/mammals/humans/mod.rs
2783+
~~
2784+
2785+
If the animals file is `src/animals/mod.rs`, `rustc` will look for:
27922786
2793-
src/animals/mod.rs - if file is in it's own subdirectory:
2787+
~~ {.notrust}
2788+
src/animals/mod.rs
27942789
src/animals/fish.rs
27952790
src/animals/fish/mod.rs
27962791
@@ -2799,11 +2794,11 @@ src/animals/mod.rs - if file is in it's own subdirectory:
27992794
28002795
~~~
28012796

2802-
These rules allow you to have both small modules that only need
2803-
to consist of one source file each and can be conveniently placed right next to each other,
2804-
and big complicated modules that group the source files of submodules in subdirectories.
2797+
These rules allow you to write small modules consisting of single source files which can live in the same directory as well as large modules which group submodule source files in subdirectories.
28052798

2806-
If you need to circumvent the defaults, you can also overwrite the path a `mod foo;` would take:
2799+
If you need to override where `rustc` will look for the file containing a
2800+
module's source code, use the `path` compiler directive. For example, to load a
2801+
`classified` module from a different file:
28072802

28082803
~~~ {.ignore}
28092804
#[path="../../area51/alien.rs"]

branches/dist-snap/src/etc/combine-tests.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
1+
# Copyright 2011-2014 The Rust Project Developers. See the COPYRIGHT
22
# file at the top-level directory of this distribution and at
33
# http://rust-lang.org/COPYRIGHT.
44
#
@@ -36,9 +36,9 @@ def scrub(b):
3636
t.startswith(".") or t.startswith("#") or t.startswith("~")):
3737
f = codecs.open(os.path.join(run_pass, t), "r", "utf8")
3838
s = f.read()
39-
if not ("xfail-test" in s or
40-
"xfail-fast" in s or
41-
"xfail-win32" in s):
39+
if not ("ignore-test" in s or
40+
"ignore-fast" in s or
41+
"ignore-win32" in s):
4242
if not "pub fn main" in s and "fn main" in s:
4343
print("Warning: no public entry point in " + t)
4444
stage2_tests.append(t)

branches/dist-snap/src/etc/extract-tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def extract_code_fragments(dest_dir, lines):
9999
block.appendleft(OUTPUT_BLOCK_HEADER)
100100

101101
if "ignore" in tags:
102-
block.appendleft("//xfail-test\n")
102+
block.appendleft("//ignore-test\n")
103103
elif "should_fail" in tags:
104104
block.appendleft("//should-fail\n")
105105

0 commit comments

Comments
 (0)