about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-01-20 17:07:30 +0000
committerbors <bors@rust-lang.org>2025-01-20 17:07:30 +0000
commit9f4d9dc102fee5c1fe8adce2c4a58254cae510f4 (patch)
treeb32038aedef7c6ae68b28d1cd80ae9d71b6ead45 /src
parent6a64e3b89724395d87a394ed9ebd954c474b080a (diff)
parentecfb55762ca4e2be1b0f900c3d0e9e166cd68f41 (diff)
downloadrust-9f4d9dc102fee5c1fe8adce2c4a58254cae510f4.tar.gz
rust-9f4d9dc102fee5c1fe8adce2c4a58254cae510f4.zip
Auto merge of #135769 - jieyouxu:rollup-3h384pz, r=jieyouxu
Rollup of 5 pull requests

Successful merges:

 - #135433 (Add Profile Override for Non-Git Sources)
 - #135626 (doc: Point to methods on `Command` as alternatives to `set/remove_var`)
 - #135658 (Do not include GCC source code in source tarballs)
 - #135676 (rustc_resolve: use structured fields in traces)
 - #135762 (Correct counting to four in cell module docs)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bootstrap.py5
-rw-r--r--src/bootstrap/src/core/build_steps/dist.rs13
-rw-r--r--src/bootstrap/src/core/config/config.rs6
3 files changed, 19 insertions, 5 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 76ee40c6f45..74923af1555 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -1268,6 +1268,11 @@ def bootstrap(args):
         config_toml = ""
 
     profile = RustBuild.get_toml_static(config_toml, "profile")
+    is_non_git_source = not os.path.exists(os.path.join(rust_root, ".git"))
+
+    if profile is None and is_non_git_source:
+        profile = "dist"
+
     if profile is not None:
         # Allows creating alias for profile names, allowing
         # profiles to be renamed while maintaining back compatibility
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index 470e400243f..18f920b85ee 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -1015,7 +1015,18 @@ impl Step for PlainSourceTarball {
         ];
         let src_dirs = ["src", "compiler", "library", "tests", "LICENSES"];
 
-        copy_src_dirs(builder, &builder.src, &src_dirs, &[], plain_dst_src);
+        copy_src_dirs(
+            builder,
+            &builder.src,
+            &src_dirs,
+            &[
+                // We don't currently use the GCC source code for building any official components,
+                // it is very big, and has unclear licensing implications due to being GPL licensed.
+                // We thus exclude it from the source tarball from now.
+                "src/gcc",
+            ],
+            plain_dst_src,
+        );
 
         // Copy the files normally
         for item in &src_files {
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index b5310108dbf..910550b0a7d 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -2931,10 +2931,8 @@ impl Config {
         let if_unchanged = || {
             if self.rust_info.is_from_tarball() {
                 // Git is needed for running "if-unchanged" logic.
-                println!(
-                    "WARNING: 'if-unchanged' has no effect on tarball sources; ignoring `download-ci-llvm`."
-                );
-                return false;
+                println!("ERROR: 'if-unchanged' is only compatible with Git managed sources.");
+                crate::exit!(1);
             }
 
             // Fetching the LLVM submodule is unnecessary for self-tests.