From 9adea6177773b992fcdf7b1df26dd527cceba40d Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:41:48 +0800 Subject: [PATCH 1/7] add a WARNING to rust.optimize option in config.toml.example --- config.toml.example | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config.toml.example b/config.toml.example index 848147c2974..0124583e41c 100644 --- a/config.toml.example +++ b/config.toml.example @@ -258,10 +258,9 @@ [rust] # Whether or not to optimize the compiler and standard library. -# -# Note: the slowness of the non optimized compiler compiling itself usually -# outweighs the time gains in not doing optimizations, therefore a -# full bootstrap takes much more time with `optimize` set to false. +# WARNING: Building with optimize = false is NOT SUPPORTED. Due to bootstrapping, +# building without optimizations takes much longer than optimizing. Further, some platforms +# fail to build without this optimization (c.f. #65352). #optimize = true # Indicates that the build should be configured for debugging Rust. A From 2f7e3d55c96ef44463bb62f98ba25538fc2fffff Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:43:06 +0800 Subject: [PATCH 2/7] add the missing rust.musl-root option in config.toml.example --- config.toml.example | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.toml.example b/config.toml.example index 0124583e41c..d6a5c5a3b92 100644 --- a/config.toml.example +++ b/config.toml.example @@ -340,6 +340,9 @@ # nightly features #channel = "dev" +# The root location of the MUSL installation directory. +#musl-root = "..." + # By default the `rustc` executable is built with `-Wl,-rpath` flags on Unix # platforms to ensure that the compiler is usable by default from the build # directory (as it links to a number of dynamic libraries). This may not be From a90954163b9cc80009ec3aeacf9974817b3b1892 Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:46:05 +0800 Subject: [PATCH 3/7] reorder Llvm struct's fields based on the order in config.toml.example --- src/bootstrap/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 52b5cd888df..a97273ed2f8 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -243,14 +243,14 @@ struct Install { #[derive(Deserialize, Default)] #[serde(deny_unknown_fields, rename_all = "kebab-case")] struct Llvm { - ccache: Option, - ninja: Option, - assertions: Option, optimize: Option, thin_lto: Option, release_debuginfo: Option, + assertions: Option, + ccache: Option, version_check: Option, static_libstdcpp: Option, + ninja: Option, targets: Option, experimental_targets: Option, link_jobs: Option, From 945223128a1c390dd457480543ee68d4c89478ee Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:50:03 +0800 Subject: [PATCH 4/7] reorder Build struct's fields based on the order in config.toml.example --- src/bootstrap/config.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index a97273ed2f8..d393990fdd2 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -200,16 +200,15 @@ struct Build { target: Vec, cargo: Option, rustc: Option, - low_priority: Option, - compiler_docs: Option, docs: Option, + compiler_docs: Option, submodules: Option, fast_submodules: Option, gdb: Option, - locked_deps: Option, - vendor: Option, nodejs: Option, python: Option, + locked_deps: Option, + vendor: Option, full_bootstrap: Option, extended: Option, tools: Option>, @@ -217,6 +216,7 @@ struct Build { sanitizers: Option, profiler: Option, cargo_native_static: Option, + low_priority: Option, configure_args: Option>, local_rebuild: Option, print_step_timings: Option, From e1e60c339a84e2263c6b728dc12596fb38035280 Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:51:02 +0800 Subject: [PATCH 5/7] reorder Install struct's fields based on the order in config.toml.example --- src/bootstrap/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index d393990fdd2..1a27ad94e04 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -228,11 +228,11 @@ struct Build { struct Install { prefix: Option, sysconfdir: Option, - datadir: Option, docdir: Option, bindir: Option, libdir: Option, mandir: Option, + datadir: Option, // standard paths, currently unused infodir: Option, From 2c93fd2cb699a240dae93f2064000ce33d9f682d Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:53:45 +0800 Subject: [PATCH 6/7] reorder Rust struct's fields based on the order in config.toml.example --- src/bootstrap/config.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 1a27ad94e04..d49c8080ebc 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -293,6 +293,7 @@ impl Default for StringOrBool { #[serde(deny_unknown_fields, rename_all = "kebab-case")] struct Rust { optimize: Option, + debug: Option, codegen_units: Option, codegen_units_std: Option, debug_assertions: Option, @@ -301,25 +302,24 @@ struct Rust { debuginfo_level_std: Option, debuginfo_level_tools: Option, debuginfo_level_tests: Option, - parallel_compiler: Option, backtrace: Option, + incremental: Option, + parallel_compiler: Option, default_linker: Option, channel: Option, musl_root: Option, rpath: Option, + verbose_tests: Option, optimize_tests: Option, codegen_tests: Option, ignore_git: Option, - debug: Option, dist_src: Option, - verbose_tests: Option, - incremental: Option, save_toolstates: Option, codegen_backends: Option>, codegen_backends_dir: Option, lld: Option, - lldb: Option, llvm_tools: Option, + lldb: Option, deny_warnings: Option, backtrace_on_ice: Option, verify_llvm_ir: Option, From 5defe06f96f62807af0ac09d1896d1baba5d8054 Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Thu, 24 Oct 2019 23:54:31 +0800 Subject: [PATCH 7/7] reorder TomlTarget struct's fields based on the order in config.toml.example --- src/bootstrap/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index d49c8080ebc..ef6253903e9 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -333,13 +333,13 @@ struct Rust { #[derive(Deserialize, Default)] #[serde(deny_unknown_fields, rename_all = "kebab-case")] struct TomlTarget { - llvm_config: Option, - llvm_filecheck: Option, cc: Option, cxx: Option, ar: Option, ranlib: Option, linker: Option, + llvm_config: Option, + llvm_filecheck: Option, android_ndk: Option, crt_static: Option, musl_root: Option,