Skip to content

Commit e00d291

Browse files
committed
---
yaml --- r: 69212 b: refs/heads/auto c: 7b2218d h: refs/heads/master v: v3
1 parent b57b690 commit e00d291

File tree

354 files changed

+8414
-5871
lines changed

Some content is hidden

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

354 files changed

+8414
-5871
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: f98f3b04012b4733450f96aba10e656225ac034f
17+
refs/heads/auto: 7b2218d248571a242ac243e0443d95619bdda056
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ endef
249249

250250
# Same interface as above, but deletes rather than just listing the files.
251251
define REMOVE_ALL_OLD_GLOB_MATCHES_EXCEPT
252-
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: removing previous" \'$(2)\' "libraries:" $$MATCHES; rm -v $$MATCHES ; fi
252+
$(Q)MATCHES="$(filter-out %$(3),$(wildcard $(1)/$(2)))"; if [ -n "$$MATCHES" ] ; then echo "Warning: removing previous" \'$(2)\' "libraries:" $$MATCHES; rm $$MATCHES ; fi
253253
endef
254254

255255
# We use a different strategy for LIST_ALL_OLD_GLOB_MATCHES_EXCEPT

branches/auto/README.md

Lines changed: 67 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,72 @@
33
This is a compiler for Rust, including standard libraries, tools and
44
documentation.
55

6+
## Quick Start
67

7-
## Installation
8+
### Windows
89

9-
The Rust compiler currently must be built from a [tarball], unless you
10-
are on Windows, in which case using the [installer][win-exe] is
11-
recommended.
10+
1. Download and use the [installer][win-exe].
11+
2. Read the [tutorial].
12+
2. Enjoy!
1213

13-
Since the Rust compiler is written in Rust, it must be built by
14-
a precompiled "snapshot" version of itself (made in an earlier state
15-
of development). As such, source builds require a connection to
16-
the Internet, to fetch snapshots, and an OS that can execute the
17-
available snapshot binaries.
14+
> ***Note:*** Windows users should read the detailed
15+
> [getting started][wiki-start] notes on the wiki. Even when using
16+
> the binary installer the Windows build requires a MinGW installation,
17+
> the precise details of which are not discussed here.
18+
19+
[tutorial]: http://static.rust-lang.org/doc/tutorial.html
20+
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
21+
[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe
22+
23+
### Linux / OS X
24+
25+
1. Install the prerequisites (if not already installed)
26+
* g++ 4.4 or clang++ 3.x
27+
* python 2.6 or later (but not 3.x)
28+
* perl 5.0 or later
29+
* gnu make 3.81 or later
30+
* curl
31+
2. Download and build Rust
32+
You can either download a [tarball] or build directly from the [repo].
33+
34+
To build from the [tarball] do:
35+
36+
$ curl -O http://static.rust-lang.org/dist/rust-0.7.tar.gz
37+
$ tar -xzf rust-0.7.tar.gz
38+
$ cd rust-0.7
39+
40+
Or to build from the [repo] do:
41+
42+
$ git clone https://github.com/mozilla/rust.git
43+
$ cd rust
44+
45+
Now that you have Rust's source code, you can configure and build it:
46+
47+
$ ./configure
48+
$ make && make install
49+
50+
You may need to use `sudo make install` if you do not normally have
51+
permission to modify the destination directory. The install locations can
52+
be adjusted by passing a `--prefix` argument to `configure`. Various other
53+
options are also supported, pass `--help` for more information on them.
54+
55+
When complete, `make install` will place several programs into
56+
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
57+
API-documentation tool, and `rustpkg`, the Rust package manager and build
58+
system.
59+
3. Read the [tutorial].
60+
4. Enjoy!
61+
62+
[repo]: https://github.com/mozilla/rust
63+
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
64+
[tutorial]: http://static.rust-lang.org/doc/tutorial.html
65+
66+
## Notes
67+
68+
Since the Rust compiler is written in Rust, it must be built by a
69+
precompiled "snapshot" version of itself (made in an earlier state of
70+
development). As such, source builds require a connection to the Internet, to
71+
fetch snapshots, and an OS that can execute the available snapshot binaries.
1872

1973
Snapshot binaries are currently built and tested on several platforms:
2074

@@ -25,42 +79,12 @@ Snapshot binaries are currently built and tested on several platforms:
2579
You may find that other platforms work, but these are our "tier 1"
2680
supported build environments that are most likely to work.
2781

28-
> ***Note:*** Windows users should read the detailed
29-
> [getting started][wiki-start] notes on the wiki. Even when using
30-
> the binary installer the Windows build requires a MinGW installation,
31-
> the precise details of which are not discussed here.
32-
33-
To build from source you will also need the following prerequisite
34-
packages:
35-
36-
* g++ 4.4 or clang++ 3.x
37-
* python 2.6 or later (but not 3.x)
38-
* perl 5.0 or later
39-
* gnu make 3.81 or later
40-
* curl
41-
42-
Assuming you're on a relatively modern *nix system and have met the
43-
prerequisites, something along these lines should work.
44-
45-
$ curl -O http://static.rust-lang.org/dist/rust-0.7.tar.gz
46-
$ tar -xzf rust-0.7.tar.gz
47-
$ cd rust-0.7
48-
$ ./configure
49-
$ make && make install
82+
Rust currently needs about 1.8G of RAM to build without swapping; if it hits
83+
swap, it will take a very long time to build.
5084

51-
You may need to use `sudo make install` if you do not normally have
52-
permission to modify the destination directory. The install locations
53-
can be adjusted by passing a `--prefix` argument to
54-
`configure`. Various other options are also supported, pass `--help`
55-
for more information on them.
85+
There is lots more documentation in the [wiki].
5686

57-
When complete, `make install` will place several programs into
58-
`/usr/local/bin`: `rustc`, the Rust compiler; `rustdoc`, the
59-
API-documentation tool, and `rustpkg`, the Rust package manager and build system.
60-
61-
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
62-
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
63-
[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe
87+
[wiki]: https://github.com/mozilla/rust/wiki
6488

6589

6690
## License
@@ -71,8 +95,3 @@ BSD-like licenses.
7195

7296
See LICENSE-APACHE, LICENSE-MIT, and COPYRIGHT for details.
7397

74-
## More help
75-
76-
The [tutorial] is a good starting point.
77-
78-
[tutorial]: http://static.rust-lang.org/doc/tutorial.html

branches/auto/configure

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -750,18 +750,18 @@ then
750750
cd ${CFG_SRC_DIR}
751751

752752
msg "git: submodule sync"
753-
"${CFG_GIT}" submodule --quiet sync
753+
"${CFG_GIT}" submodule sync
754754

755755
msg "git: submodule update"
756-
"${CFG_GIT}" submodule --quiet update --init
756+
"${CFG_GIT}" submodule update --init
757757
need_ok "git failed"
758758

759759
msg "git: submodule foreach sync"
760-
"${CFG_GIT}" submodule --quiet foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
760+
"${CFG_GIT}" submodule foreach --recursive 'if test -e .gitmodules; then git submodule sync; fi'
761761
need_ok "git failed"
762762

763763
msg "git: submodule foreach update"
764-
"${CFG_GIT}" submodule --quiet update --init --recursive
764+
"${CFG_GIT}" submodule update --init --recursive
765765
need_ok "git failed"
766766

767767
# NB: this is just for the sake of getting the submodule SHA1 values
@@ -770,9 +770,9 @@ then
770770
"${CFG_GIT}" submodule status --recursive
771771

772772
msg "git: submodule clobber"
773-
"${CFG_GIT}" submodule --quiet foreach --recursive git clean -dxf
773+
"${CFG_GIT}" submodule foreach --recursive git clean -dxf
774774
need_ok "git failed"
775-
"${CFG_GIT}" submodule --quiet foreach --recursive git checkout .
775+
"${CFG_GIT}" submodule foreach --recursive git checkout .
776776
need_ok "git failed"
777777

778778
cd ${CFG_BUILD_DIR}
@@ -921,9 +921,6 @@ do
921921
esac
922922
need_ok "LLVM configure failed"
923923

924-
# Hack the tools Makefile to turn off the clang build
925-
sed -i 's/clang//g' tools/Makefile
926-
927924
cd $CFG_BUILD_DIR
928925
fi
929926

branches/auto/doc/rust.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,8 +573,7 @@ The top level of this tree is a module that is anonymous (from the point of view
573573

574574
The Rust compiler is always invoked with a single source file as input, and always produces a single output crate.
575575
The processing of that source file may result in other source files being loaded as modules.
576-
Source files typically have the extension `.rs` but, by convention,
577-
source files that represent crates have the extension `.rc`, called *crate files*.
576+
Source files have the extension `.rs`.
578577

579578
A Rust source file describes a module, the name and
580579
location of which -- in the module tree of the current crate -- are defined
@@ -1122,6 +1121,41 @@ static bits_n_strings: BitsNStrings<'static> = BitsNStrings {
11221121
};
11231122
~~~~
11241123

1124+
#### Mutable statics
1125+
1126+
If a static item is declared with the ```mut``` keyword, then it is allowed to
1127+
be modified by the program. One of Rust's goals is to make concurrency bugs hard
1128+
to run into, and this is obviously a very large source of race conditions or
1129+
other bugs. For this reason, an ```unsafe``` block is required when either
1130+
reading or writing a mutable static variable. Care should be taken to ensure
1131+
that modifications to a mutable static are safe with respect to other tasks
1132+
running in the same process.
1133+
1134+
Mutable statics are still very useful, however. They can be used with C
1135+
libraries and can also be bound from C libraries (in an ```extern``` block).
1136+
1137+
~~~
1138+
# fn atomic_add(_: &mut uint, _: uint) -> uint { 2 }
1139+
1140+
static mut LEVELS: uint = 0;
1141+
1142+
// This violates the idea of no shared state, and this doesn't internally
1143+
// protect against races, so this function is `unsafe`
1144+
unsafe fn bump_levels_unsafe1() -> uint {
1145+
let ret = LEVELS;
1146+
LEVELS += 1;
1147+
return ret;
1148+
}
1149+
1150+
// Assuming that we have an atomic_add function which returns the old value,
1151+
// this function is "safe" but the meaning of the return value may not be what
1152+
// callers expect, so it's still marked as `unsafe`
1153+
unsafe fn bump_levels_unsafe2() -> uint {
1154+
return atomic_add(&mut LEVELS, 1);
1155+
}
1156+
1157+
~~~
1158+
11251159
### Traits
11261160

11271161
A _trait_ describes a set of method types.
@@ -3251,7 +3285,7 @@ As an example, to see all the logs generated by the compiler, you would set
32513285
you would set it to `rustc::metadata::creader`. To see just error logging
32523286
use `rustc=0`.
32533287

3254-
Note that when compiling either `.rs` or `.rc` files that don't specify a
3288+
Note that when compiling source files that don't specify a
32553289
crate name the crate is given a default name that matches the source file,
32563290
with the extension removed. In that case, to turn on logging for a program
32573291
compiled from, e.g. `helloworld.rs`, `RUST_LOG` should be set to `helloworld`.

branches/auto/doc/tutorial.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ supported build environments that are most likely to work.
8484
> know.
8585
8686
[bug-3319]: https://github.com/mozilla/rust/issues/3319
87-
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
87+
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
8888

8989
To build from source you will also need the following prerequisite
9090
packages:
@@ -118,7 +118,6 @@ API-documentation tool; `rustpkg`, the Rust package manager;
118118
`rusti`, the Rust REPL; and `rust`, a tool which acts both as a unified
119119
interface for them, and for a few common command line scenarios.
120120

121-
[wiki-start]: https://github.com/mozilla/rust/wiki/Note-getting-started-developing-Rust
122121
[tarball]: http://static.rust-lang.org/dist/rust-0.7.tar.gz
123122
[win-exe]: http://static.rust-lang.org/dist/rust-0.7-install.exe
124123

@@ -410,8 +409,6 @@ println(fmt!("what is this thing: %?", mystery_object));
410409

411410
You can define your own syntax extensions with the macro system. For details, see the [macro tutorial][macros].
412411

413-
[macros]: tutorial-macros.html
414-
415412
# Control structures
416413

417414
## Conditionals
@@ -1517,8 +1514,6 @@ closures, but they also own them: that is, no other code can access
15171514
them. Owned closures are used in concurrent code, particularly
15181515
for spawning [tasks][tasks].
15191516

1520-
[tasks]: tutorial-tasks.html
1521-
15221517
## Closure compatibility
15231518

15241519
Rust closures have a convenient subtyping property: you can pass any kind of
@@ -2543,9 +2538,4 @@ There is further documentation on the [wiki].
25432538
[ffi]: tutorial-ffi.html
25442539

25452540
[wiki]: https://github.com/mozilla/rust/wiki/Docs
2546-
[unit testing]: https://github.com/mozilla/rust/wiki/Doc-unit-testing
2547-
[rustdoc]: https://github.com/mozilla/rust/wiki/Doc-using-rustdoc
2548-
[cargo]: https://github.com/mozilla/rust/wiki/Doc-using-cargo-to-manage-packages
2549-
[attributes]: https://github.com/mozilla/rust/wiki/Doc-attributes
25502541

2551-
[pound-rust]: http://chat.mibbit.com/?server=irc.mozilla.org&channel=%23rust

branches/auto/mk/snap.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,8 @@ define DEF_SNAP_FOR_STAGE_H
1212
# $(1) stage
1313
# $(2) triple
1414

15-
ifdef CFG_INSTALL_SNAP
16-
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
17-
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2) install
18-
else
1915
snap-stage$(1)-H-$(2): $$(HSREQ$(1)_H_$(2))
2016
$(CFG_PYTHON) $(S)src/etc/make-snapshot.py stage$(1) $(2)
21-
endif
2217

2318
endef
2419

branches/auto/mk/target.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ export CFG_COMPILER_TRIPLE
1717
# code, make sure that these common warnings are denied by default. These can
1818
# be overridden during development temporarily. For stage0, we allow all these
1919
# to suppress warnings which may be bugs in stage0 (should be fixed in stage1+)
20-
# NOTE: add "-A warnings" after snapshot to WFLAGS_ST0
21-
WFLAGS_ST0 = -A unrecognized-lint
20+
WFLAGS_ST0 = -A warnings
2221
WFLAGS_ST1 = -D warnings
2322
WFLAGS_ST2 = -D warnings
2423

branches/auto/src/etc/emacs/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,3 @@ marking, press x, and ELPA will install the packages for you (under
9898
~/.emacs.d/elpa/).
9999

100100
* or using <kbd>M-x package-install rust-mode
101-
102-
### Known bugs
103-
104-
* Combining `global-whitespace-mode` and `rust-mode` is generally glitchy.
105-
See [Issue #3994](https://github.com/mozilla/rust/issues/3994).

branches/auto/src/etc/extract-tests.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@
6060
if not re.search(r"\bextern mod extra\b", block):
6161
block = "extern mod extra;\n" + block
6262
block = """#[ forbid(ctypes) ];
63-
#[ forbid(deprecated_pattern) ];
64-
#[ forbid(implicit_copies) ];
65-
#[ forbid(non_implicitly_copyable_typarams) ];
6663
#[ forbid(path_statement) ];
6764
#[ forbid(type_limits) ];
6865
#[ forbid(unrecognized_lint) ];

branches/auto/src/etc/make-snapshot.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@
33

44
import snapshot, sys
55

6-
if len(sys.argv) == 3:
7-
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], ""))
8-
else:
9-
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2], sys.argv[3]))
6+
print(snapshot.make_snapshot(sys.argv[1], sys.argv[2]))

0 commit comments

Comments
 (0)