@@ -97,33 +97,38 @@ system internals, try asking in [`#rust-internals`][pound-rust-internals].
9797
9898Before you can start building the compiler you need to configure the build for
9999your 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.
100+ for Rust.
102101
103- ```
104- ./configure
105- ```
102+ To change configuration, you must copy the file ` src/bootstrap/config.toml.example `
103+ to ` config.toml ` in the directory from which you will be running the build, and
104+ change the settings provided.
105+
106+ There are large number of options provided in this config file that will alter the
107+ configuration used in the build process. Some options to note:
106108
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+ #### ` [llvm] ` :
110+ - ` ccache = true ` - Use ccache when building llvm
109111
110- - ` --enable-debug ` - Build a debug version of the compiler (disables optimizations,
111- which speeds up compilation of stage1 rustc)
112- - ` --enable-optimize ` - Enable optimizations (can be used with ` --enable-debug `
113- to make a debug build with optimizations)
114- - ` --disable-valgrind-rpass ` - Don't run tests with valgrind
115- - ` --enable-clang ` - Prefer clang to gcc for building dependencies (e.g., LLVM)
116- - ` --enable-ccache ` - Invoke clang/gcc with ccache to re-use object files between builds
117- - ` --enable-compiler-docs ` - Build compiler documentation
112+ #### ` [build] ` :
113+ - ` compiler-docs = true ` - Build compiler documentation
118114
119- To see a full list of options, run ` ./configure --help ` .
115+ #### ` [rust] ` :
116+ - ` debuginfo = true ` - Build a compiler with debuginfo
117+ - ` optimize = false ` - Disable optimizations to speed up compilation of stage1 rust
118+
119+ For more options, the ` config.toml ` file contains commented out defaults, with
120+ descriptions of what each option will do.
121+
122+ Note: Previously the ` ./configure ` script was used to configure this
123+ project. It can still be used, but it's recommended to use a ` config.toml `
124+ file. If you still have a ` config.mk ` file in your directory - from
125+ ` ./configure ` - you may need to delete it for ` config.toml ` to work.
120126
121127### Building
122128
123- Although the ` ./configure ` script will generate a ` Makefile ` , this is actually
124- just a thin veneer over the actual build system driver, ` x.py ` . This file, at
125- the root of the repository, is used to build, test, and document various parts
126- of the compiler. You can execute it as:
129+ The build system uses the ` x.py ` script to control the build process. This script
130+ is used to build, test, and document various parts of the compiler. You can
131+ execute it as:
127132
128133``` sh
129134python x.py build
@@ -185,6 +190,9 @@ To learn about all possible rules you can execute, run:
185190python x.py build --help --verbose
186191```
187192
193+ Note: Previously ` ./configure ` and ` make ` were used to build this project.
194+ They are still available, but ` x.py ` is the recommended build system.
195+
188196### Useful commands
189197
190198Some common invocations of ` x.py ` are:
@@ -235,8 +243,8 @@ feature. We use the 'fork and pull' model described there.
235243
236244Please make pull requests against the ` master ` branch.
237245
238- Compiling all of ` make check ` can take a while. When testing your pull request,
239- consider using one of the more specialized ` make ` targets to cut down on the
246+ Compiling all of ` ./x.py test ` can take a while. When testing your pull request,
247+ consider using one of the more specialized ` ./x.py ` targets to cut down on the
240248amount of time you have to wait. You need to have built the compiler at least
241249once before running these will work, but that’s only one full build rather than
242250one each time.
@@ -307,7 +315,7 @@ To find documentation-related issues, sort by the [A-docs label][adocs].
307315
308316[ adocs ] : https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AA-docs
309317
310- In many cases, you don't need a full ` make doc` . You can use ` rustdoc ` directly
318+ In many cases, you don't need a full ` ./x.py doc` . You can use ` rustdoc ` directly
311319to check small fixes. For example, ` rustdoc src/doc/reference.md ` will render
312320reference to ` doc/reference.html ` . The CSS might be messed up, but you can
313321verify that the HTML is right.
0 commit comments