]> git.lizzy.rs Git - rust.git/blobdiff - CONTRIBUTING.md
[breaking-change] don't glob export ast::StrStyle variants
[rust.git] / CONTRIBUTING.md
index 94576bbac1f2ca2463ef1e2a1e4d8cde94ea0d5a..609bf03fb6c91ba8e2f978bb62e0d5dedcfb693d 100644 (file)
@@ -80,14 +80,16 @@ $ RUST_BACKTRACE=1 rustc ...
 
 ## The Build System
 
-The build system for Rust is complex. It covers bootstrapping the compiler,
-running tests, building documentation and more. Unless you are familiar with
-Makefiles, I wouldn't suggest trying to understand everything going on in
-Rust's setup - there's a lot there, and you can get lost trying to understand
-it all.
+Rust's build system allows you to bootstrap the compiler, run tests &
+benchmarks, generate documentation, install a fresh build of Rust, and more.
+It's your best friend when working on Rust, allowing you to compile & test
+your contributions before submission.
 
-If Makefiles are your thing, though, all the configuration lives in
-[the `mk` directory][mkdir] in the project root.
+All the configuration for the build system lives in [the `mk` directory][mkdir]
+in the project root. It can be hard to follow in places, as it uses some
+advanced Make features which make for some challenging reading. If you have
+questions on the build system internals, try asking in
+[`#rust-internals`][pound-rust-internals].
 
 [mkdir]: https://github.com/rust-lang/rust/tree/master/mk/
 
@@ -106,9 +108,12 @@ There are large number of options accepted by this script to alter the
 configuration used later in the build process. Some options to note:
 
 - `--enable-debug` - Build a debug version of the compiler (disables optimizations)
+- `--enable-optimize` - Enable optimizations (can be used with `--enable-debug`
+    to make a debug build with optimizations)
 - `--disable-valgrind-rpass` - Don't run tests with valgrind
-- `--enable-clang` - Prefer clang to gcc for building dependencies (ie LLVM)
+- `--enable-clang` - Prefer clang to gcc for building dependencies (e.g., LLVM)
 - `--enable-ccache` - Invoke clang/gcc with ccache to re-use object files between builds
+- `--enable-compiler-docs` - Build compiler documentation
 
 To see a full list of options, run `./configure --help`.
 
@@ -126,11 +131,16 @@ Some common make targets are:
   & everything builds in the correct manner.
 - `make check-stage1-std NO_REBUILD=1` - test the standard library without
   rebuilding the entire compiler
-- `make check TESTNAME=<path-to-test-file>.rs` - Run a single test file
-- `make check-stage1-rpass TESTNAME=<path-to-test-file>.rs` - Run a single
+- `make check TESTNAME=<substring-of-test-name>` - Run a matching set of tests.
+  - `TESTNAME` should be a substring of the tests to match against e.g. it could 
+    be the fully qualified test name, or just a part of it. 
+    `TESTNAME=collections::hash::map::test_map::test_capacity_not_less_than_len`
+    or `TESTNAME=test_capacity_not_less_than_len`.
+- `make check-stage1-rpass TESTNAME=<substring-of-test-name>` - Run a single
   rpass test with the stage1 compiler (this will be quicker than running the
   command above as we only build the stage1 compiler, not the entire thing).
   You can also leave off the `-rpass` to run all stage1 test types.
+- `make check-stage1-coretest` - Run stage1 tests in `libcore`.
 
 ## Pull Requests