about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAleksey Kliger <alklig@microsoft.com>2025-08-08 12:57:02 -0400
committerAleksey Kliger <alklig@microsoft.com>2025-08-08 15:12:27 -0400
commitcba591871db4a76b17ba330d800affb316df1cdb (patch)
treea3ea01f4e02a49ce520bab85c14e8118c5e4e8b2 /src
parent2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff)
downloadrust-cba591871db4a76b17ba330d800affb316df1cdb.tar.gz
rust-cba591871db4a76b17ba330d800affb316df1cdb.zip
bootstrap: `x.py dist rustc-src` should keep LLVM's siphash
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/src/core/build_steps/dist.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs
index cbbfb6b6a11..6b3897c5c6f 100644
--- a/src/bootstrap/src/core/build_steps/dist.rs
+++ b/src/bootstrap/src/core/build_steps/dist.rs
@@ -925,6 +925,8 @@ fn copy_src_dirs(
             "llvm-project\\cmake",
             "llvm-project/runtimes",
             "llvm-project\\runtimes",
+            "llvm-project/third-party",
+            "llvm-project\\third-party",
         ];
         if spath.contains("llvm-project")
             && !spath.ends_with("llvm-project")
@@ -933,6 +935,18 @@ fn copy_src_dirs(
             return false;
         }
 
+        // Keep only these third party libraries
+        const LLVM_THIRD_PARTY: &[&str] =
+            &["llvm-project/third-party/siphash", "llvm-project\\third-party\\siphash"];
+        if (spath.starts_with("llvm-project/third-party")
+            || spath.starts_with("llvm-project\\third-party"))
+            && !(spath.ends_with("llvm-project/third-party")
+                || spath.ends_with("llvm-project\\third-party"))
+            && !LLVM_THIRD_PARTY.iter().any(|path| spath.contains(path))
+        {
+            return false;
+        }
+
         const LLVM_TEST: &[&str] = &["llvm-project/llvm/test", "llvm-project\\llvm\\test"];
         if LLVM_TEST.iter().any(|path| spath.contains(path))
             && (spath.ends_with(".ll") || spath.ends_with(".td") || spath.ends_with(".s"))