@@ -73,16 +73,19 @@ The script accepts commands, flags, and arguments to determine what to do:
73
73
74
74
## Configuring rustbuild
75
75
76
- There are currently two primary methods for configuring the rustbuild build
77
- system. First, the ` ./configure ` options serialized in ` config.mk ` will be
78
- parsed and read. That is, if any ` ./configure ` options are passed, they'll be
79
- handled naturally.
76
+ There are currently two methods for configuring the rustbuild build system.
80
77
81
- Next , rustbuild offers a TOML-based configuration system with a ` config.toml `
78
+ First , rustbuild offers a TOML-based configuration system with a ` config.toml `
82
79
file in the same location as ` config.mk ` . An example of this configuration can
83
- be found at ` config.toml.example ` , and the configuration file
84
- can also be passed as ` --config path/to/config.toml ` if the build system is
85
- being invoked manually (via the python script).
80
+ be found at ` config.toml.example ` , and the configuration file can also be passed
81
+ as ` --config path/to/config.toml ` if the build system is being invoked manually
82
+ (via the python script).
83
+
84
+ Next, the ` ./configure ` options serialized in ` config.mk ` will be
85
+ parsed and read. That is, if any ` ./configure ` options are passed, they'll be
86
+ handled naturally. ` ./configure ` should almost never be used for local
87
+ installations, and is primarily useful for CI. Prefer to customize behavior
88
+ using ` config.toml ` .
86
89
87
90
Finally, rustbuild makes use of the [ gcc-rs crate] which has [ its own
88
91
method] [ env-vars ] of configuring C compilers and C flags via environment
@@ -310,17 +313,18 @@ After that, each module in rustbuild should have enough documentation to keep
310
313
you up and running. Some general areas that you may be interested in modifying
311
314
are:
312
315
313
- * Adding a new build tool? Take a look at ` bootstrap/step .rs ` for examples of
316
+ * Adding a new build tool? Take a look at ` bootstrap/tool .rs ` for examples of
314
317
other tools.
315
318
* Adding a new compiler crate? Look no further! Adding crates can be done by
316
319
adding a new directory with ` Cargo.toml ` followed by configuring all
317
320
` Cargo.toml ` files accordingly.
318
- * Adding a new dependency from crates.io? We're still working on that, so hold
319
- off on that for now .
320
- * Adding a new configuration option? Take a look at ` bootstrap/config .rs ` or
321
- perhaps ` bootstrap/flags .rs ` and then modify the build elsewhere to read that
322
- option .
321
+ * Adding a new dependency from crates.io? This should just work inside the
322
+ compiler artifacts stage (everything other than libtest and libstd) .
323
+ * Adding a new configuration option? You'll want to modify ` bootstrap/flags .rs `
324
+ for command line flags and then ` bootstrap/config .rs ` to copy the flags to the
325
+ ` Config ` struct .
323
326
* Adding a sanity check? Take a look at ` bootstrap/sanity.rs ` .
324
327
325
- If you have any questions feel free to reach out on ` #rust-internals ` on IRC or
326
- open an issue in the bug tracker!
328
+ If you have any questions feel free to reach out on ` #rust-infra ` on IRC or ask on
329
+ internals.rust-lang.org. When you encounter bugs, please file issues on the
330
+ rust-lang/rust issue tracker.
0 commit comments