summaryrefslogtreecommitdiffstats
path: root/src/bootstrap/defaults
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootstrap/defaults')
-rw-r--r--src/bootstrap/defaults/README.md12
-rw-r--r--src/bootstrap/defaults/config.codegen.toml19
-rw-r--r--src/bootstrap/defaults/config.compiler.toml18
-rw-r--r--src/bootstrap/defaults/config.library.toml14
-rw-r--r--src/bootstrap/defaults/config.tools.toml22
-rw-r--r--src/bootstrap/defaults/config.user.toml9
6 files changed, 94 insertions, 0 deletions
diff --git a/src/bootstrap/defaults/README.md b/src/bootstrap/defaults/README.md
new file mode 100644
index 000000000..f5b96db1b
--- /dev/null
+++ b/src/bootstrap/defaults/README.md
@@ -0,0 +1,12 @@
+# About bootstrap defaults
+
+These defaults are intended to be a good starting point for working with x.py,
+with the understanding that no one set of defaults make sense for everyone.
+
+They are still experimental, and we'd appreciate your help improving them!
+If you use a setting that's not in these defaults that you think
+others would benefit from, please [file an issue] or make a PR with the changes.
+Similarly, if one of these defaults doesn't match what you use personally,
+please open an issue to get it changed.
+
+[file an issue]: https://github.com/rust-lang/rust/issues/new/choose
diff --git a/src/bootstrap/defaults/config.codegen.toml b/src/bootstrap/defaults/config.codegen.toml
new file mode 100644
index 000000000..088cbd105
--- /dev/null
+++ b/src/bootstrap/defaults/config.codegen.toml
@@ -0,0 +1,19 @@
+# These defaults are meant for contributors to the compiler who modify codegen or LLVM
+[build]
+# Contributors working on the compiler will probably expect compiler docs to be generated.
+compiler-docs = true
+
+[llvm]
+# This enables debug-assertions in LLVM,
+# catching logic errors in codegen much earlier in the process.
+assertions = true
+
+[rust]
+# This enables `RUSTC_LOG=debug`, avoiding confusing situations
+# where adding `debug!()` appears to do nothing.
+# However, it makes running the compiler slightly slower.
+debug-logging = true
+# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
+incremental = true
+# Print backtrace on internal compiler errors during bootstrap
+backtrace-on-ice = true
diff --git a/src/bootstrap/defaults/config.compiler.toml b/src/bootstrap/defaults/config.compiler.toml
new file mode 100644
index 000000000..2f4ccb825
--- /dev/null
+++ b/src/bootstrap/defaults/config.compiler.toml
@@ -0,0 +1,18 @@
+# These defaults are meant for contributors to the compiler who do not modify codegen or LLVM
+[build]
+# Contributors working on the compiler will probably expect compiler docs to be generated.
+compiler-docs = true
+
+[rust]
+# This enables `RUSTC_LOG=debug`, avoiding confusing situations
+# where adding `debug!()` appears to do nothing.
+# However, it makes running the compiler slightly slower.
+debug-logging = true
+# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
+incremental = true
+# Print backtrace on internal compiler errors during bootstrap
+backtrace-on-ice = true
+
+[llvm]
+# Will download LLVM from CI if available on your platform.
+download-ci-llvm = "if-available"
diff --git a/src/bootstrap/defaults/config.library.toml b/src/bootstrap/defaults/config.library.toml
new file mode 100644
index 000000000..7bc054d3a
--- /dev/null
+++ b/src/bootstrap/defaults/config.library.toml
@@ -0,0 +1,14 @@
+# These defaults are meant for contributors to the standard library and documentation.
+[build]
+# When building the standard library, you almost never want to build the compiler itself.
+build-stage = 0
+test-stage = 0
+bench-stage = 0
+
+[rust]
+# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
+incremental = true
+
+[llvm]
+# Will download LLVM from CI if available on your platform.
+download-ci-llvm = "if-available"
diff --git a/src/bootstrap/defaults/config.tools.toml b/src/bootstrap/defaults/config.tools.toml
new file mode 100644
index 000000000..6b6625342
--- /dev/null
+++ b/src/bootstrap/defaults/config.tools.toml
@@ -0,0 +1,22 @@
+# These defaults are meant for contributors to tools which build on the
+# compiler, but do not modify it directly.
+[rust]
+# This enables `RUSTC_LOG=debug`, avoiding confusing situations
+# where adding `debug!()` appears to do nothing.
+# However, it makes running the compiler slightly slower.
+debug-logging = true
+# This greatly increases the speed of rebuilds, especially when there are only minor changes. However, it makes the initial build slightly slower.
+incremental = true
+# Download rustc from CI instead of building it from source.
+# This cuts compile times by almost 60x, but means you can't modify the compiler.
+download-rustc = "if-unchanged"
+
+[build]
+# Document with the in-tree rustdoc by default, since `download-rustc` makes it quick to compile.
+doc-stage = 2
+# Contributors working on tools will probably expect compiler docs to be generated, so they can figure out how to use the API.
+compiler-docs = true
+
+[llvm]
+# Will download LLVM from CI if available on your platform.
+download-ci-llvm = "if-available"
diff --git a/src/bootstrap/defaults/config.user.toml b/src/bootstrap/defaults/config.user.toml
new file mode 100644
index 000000000..6647061d8
--- /dev/null
+++ b/src/bootstrap/defaults/config.user.toml
@@ -0,0 +1,9 @@
+# These defaults are meant for users and distro maintainers building from source, without intending to make multiple changes.
+[build]
+# When compiling from source, you almost always want a full stage 2 build,
+# which has all the latest optimizations from nightly.
+build-stage = 2
+test-stage = 2
+doc-stage = 2
+# When compiling from source, you usually want all tools.
+extended = true