From fa418487e0faf81d60c939494305368bcb818a90 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Mon, 11 Mar 2024 13:26:18 +0100 Subject: Vendor rustc_codegen_gcc --- src/bootstrap/bootstrap.py | 1 + src/bootstrap/src/core/build_steps/dist.rs | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src/bootstrap') diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 6e49bcc9744..197db2aa39e 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -1032,6 +1032,7 @@ class RustBuild(object): sync_dirs = "--sync ./src/tools/cargo/Cargo.toml " \ "--sync ./src/tools/rust-analyzer/Cargo.toml " \ "--sync ./compiler/rustc_codegen_cranelift/Cargo.toml " \ + "--sync ./compiler/rustc_codegen_gcc/Cargo.toml " \ "--sync ./src/bootstrap/Cargo.toml " eprint('ERROR: vendoring required, but vendor directory does not exist.') eprint(' Run `cargo vendor {}` to initialize the ' diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 613c58252d3..eca1e248e09 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -1009,6 +1009,8 @@ impl Step for PlainSourceTarball { .arg("--sync") .arg(builder.src.join("./compiler/rustc_codegen_cranelift/Cargo.toml")) .arg("--sync") + .arg(builder.src.join("./compiler/rustc_codegen_gcc/Cargo.toml")) + .arg("--sync") .arg(builder.src.join("./src/bootstrap/Cargo.toml")) // Will read the libstd Cargo.toml // which uses the unstable `public-dependency` feature. -- cgit 1.4.1-3-g733a5 From 199589d81466a4b436bd41cc0dfd2f35c908a951 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Fri, 5 Apr 2024 10:52:36 +0300 Subject: handle rustc args properly in bootstrap Because `RUSTFLAGS` gets overwritten during the conversion from `Cargo` to `Command`, the passed rustc args were being lost. This change combines the rustc args with the values that override `RUSTFLAGS`. Signed-off-by: onur-ozkan --- src/bootstrap/src/core/builder.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/bootstrap') diff --git a/src/bootstrap/src/core/builder.rs b/src/bootstrap/src/core/builder.rs index c051b818328..23a5a954e62 100644 --- a/src/bootstrap/src/core/builder.rs +++ b/src/bootstrap/src/core/builder.rs @@ -2093,12 +2093,10 @@ impl<'a> Builder<'a> { rustdocflags.arg("--cfg=parallel_compiler"); } - // set rustc args passed from command line - let rustc_args = - self.config.cmd.rustc_args().iter().map(|s| s.to_string()).collect::>(); - if !rustc_args.is_empty() { - cargo.env("RUSTFLAGS", &rustc_args.join(" ")); - } + // Pass the value of `--rustc-args` from test command. If it's not a test command, this won't set anything. + self.config.cmd.rustc_args().iter().for_each(|v| { + rustflags.arg(v); + }); Cargo { command: cargo, -- cgit 1.4.1-3-g733a5