Skip to content

Commit 1666a47

Browse files
committed
---
yaml --- r: 274711 b: refs/heads/stable c: 32d962d h: refs/heads/master i: 274709: 1903882 274707: ee75745 274703: 9428a1e
1 parent feaae74 commit 1666a47

File tree

588 files changed

+16545
-95605
lines changed

Some content is hidden

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

588 files changed

+16545
-95605
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: c0221c8897db309a79990367476177b1230bb264
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: aeb3aba951bca3307a1cbb7d1882437091e8070b
32+
refs/heads/stable: 32d962d16fc0abcb63fd705b3cde35025da77a13
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/CONTRIBUTING.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ links to the major sections:
66

77
* [Feature Requests](#feature-requests)
88
* [Bug Reports](#bug-reports)
9+
* [The Build System](#the-build-system)
910
* [Pull Requests](#pull-requests)
1011
* [Writing Documentation](#writing-documentation)
1112
* [Issue Triage](#issue-triage)
@@ -77,6 +78,70 @@ to do this is to invoke `rustc` like this:
7778
$ RUST_BACKTRACE=1 rustc ...
7879
```
7980

81+
## The Build System
82+
83+
Rust's build system allows you to bootstrap the compiler, run tests &
84+
benchmarks, generate documentation, install a fresh build of Rust, and more.
85+
It's your best friend when working on Rust, allowing you to compile & test
86+
your contributions before submission.
87+
88+
All the configuration for the build system lives in [the `mk` directory][mkdir]
89+
in the project root. It can be hard to follow in places, as it uses some
90+
advanced Make features which make for some challenging reading. If you have
91+
questions on the build system internals, try asking in
92+
[`#rust-internals`][pound-rust-internals].
93+
94+
[mkdir]: https://github.com/rust-lang/rust/tree/master/mk/
95+
96+
### Configuration
97+
98+
Before you can start building the compiler you need to configure the build for
99+
your system. In most cases, that will just mean using the defaults provided
100+
for Rust. Configuring involves invoking the `configure` script in the project
101+
root.
102+
103+
```
104+
./configure
105+
```
106+
107+
There are large number of options accepted by this script to alter the
108+
configuration used later in the build process. Some options to note:
109+
110+
- `--enable-debug` - Build a debug version of the compiler (disables optimizations)
111+
- `--enable-optimize` - Enable optimizations (can be used with `--enable-debug`
112+
to make a debug build with optimizations)
113+
- `--disable-valgrind-rpass` - Don't run tests with valgrind
114+
- `--enable-clang` - Prefer clang to gcc for building dependencies (e.g., LLVM)
115+
- `--enable-ccache` - Invoke clang/gcc with ccache to re-use object files between builds
116+
- `--enable-compiler-docs` - Build compiler documentation
117+
118+
To see a full list of options, run `./configure --help`.
119+
120+
### Useful Targets
121+
122+
Some common make targets are:
123+
124+
- `make rustc-stage1` - build up to (and including) the first stage. For most
125+
cases we don't need to build the stage2 compiler, so we can save time by not
126+
building it. The stage1 compiler is a fully functioning compiler and
127+
(probably) will be enough to determine if your change works as expected.
128+
- `make check` - build the full compiler & run all tests (takes a while). This
129+
is what gets run by the continuous integration system against your pull
130+
request. You should run this before submitting to make sure your tests pass
131+
& everything builds in the correct manner.
132+
- `make check-stage1-std NO_REBUILD=1` - test the standard library without
133+
rebuilding the entire compiler
134+
- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
135+
- `TESTNAME` should be a substring of the tests to match against e.g. it could
136+
be the fully qualified test name, or just a part of it.
137+
`TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
138+
or `TESTNAME=test_capacity_not_less_than_len`.
139+
- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single
140+
rpass test with the stage1 compiler (this will be quicker than running the
141+
command above as we only build the stage1 compiler, not the entire thing).
142+
You can also leave off the `-rpass` to run all stage1 test types.
143+
- `make check-stage1-coretest` - Run stage1 tests in `libcore`.
144+
80145
## Pull Requests
81146

82147
Pull requests are the primary mechanism we use to change Rust. GitHub itself

branches/stable/COPYRIGHT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ terms.
66

77
Longer version:
88

9-
The Rust Project is copyright 2016, The Rust Project
10-
Developers (given in the file AUTHORS.txt).
9+
The Rust Project is copyright 2010, The Rust Project
10+
Developers.
1111

1212
Licensed under the Apache License, Version 2.0
1313
<LICENSE-APACHE or

branches/stable/LICENSE-MIT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2016 The Rust Project Developers
1+
Copyright (c) 2010 The Rust Project Developers
22

33
Permission is hereby granted, free of charge, to any
44
person obtaining a copy of this software and associated

branches/stable/Makefile.in

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -220,19 +220,12 @@ endif
220220
# The test suite
221221
ifneq ($(strip $(findstring check,$(MAKECMDGOALS)) \
222222
$(findstring test,$(MAKECMDGOALS)) \
223-
$(findstring perf,$(MAKECMDGOALS)) \
224223
$(findstring tidy,$(MAKECMDGOALS))),)
225224
CFG_INFO := $(info cfg: including test rules)
226225
include $(CFG_SRC_DIR)mk/tests.mk
227226
include $(CFG_SRC_DIR)mk/grammar.mk
228227
endif
229228

230-
# Performance and benchmarking
231-
ifneq ($(findstring perf,$(MAKECMDGOALS)),)
232-
CFG_INFO := $(info cfg: including perf rules)
233-
include $(CFG_SRC_DIR)mk/perf.mk
234-
endif
235-
236229
# Copy all the distributables to another directory for binary install
237230
ifneq ($(strip $(findstring prepare,$(MAKECMDGOALS)) \
238231
$(findstring dist,$(MAKECMDGOALS)) \

branches/stable/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and documentation.
99

1010
Read ["Installing Rust"] from [The Book].
1111

12-
["Installing Rust"]: https://doc.rust-lang.org/book/installing-rust.html
12+
["Installing Rust"]: https://doc.rust-lang.org/book/getting-started.html#installing-rust
1313
[The Book]: https://doc.rust-lang.org/book/index.html
1414

1515
## Building from Source

0 commit comments

Comments
 (0)