Skip to content

Commit 92bdf9e

Browse files
authored
Rollup merge of rust-lang#145121 - lambdageek:dist-must-keep-llvm-third-party-siphash, r=Kobzol
bootstrap: `x.py dist rustc-src` should keep LLVM's siphash Fixes rust-lang#145117
2 parents a7a4e17 + cba5918 commit 92bdf9e

File tree

1 file changed

+14
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+14
-0
lines changed

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -925,6 +925,8 @@ fn copy_src_dirs(
925925
"llvm-project\\cmake",
926926
"llvm-project/runtimes",
927927
"llvm-project\\runtimes",
928+
"llvm-project/third-party",
929+
"llvm-project\\third-party",
928930
];
929931
if spath.contains("llvm-project")
930932
&& !spath.ends_with("llvm-project")
@@ -933,6 +935,18 @@ fn copy_src_dirs(
933935
return false;
934936
}
935937

938+
// Keep only these third party libraries
939+
const LLVM_THIRD_PARTY: &[&str] =
940+
&["llvm-project/third-party/siphash", "llvm-project\\third-party\\siphash"];
941+
if (spath.starts_with("llvm-project/third-party")
942+
|| spath.starts_with("llvm-project\\third-party"))
943+
&& !(spath.ends_with("llvm-project/third-party")
944+
|| spath.ends_with("llvm-project\\third-party"))
945+
&& !LLVM_THIRD_PARTY.iter().any(|path| spath.contains(path))
946+
{
947+
return false;
948+
}
949+
936950
const LLVM_TEST: &[&str] = &["llvm-project/llvm/test", "llvm-project\\llvm\\test"];
937951
if LLVM_TEST.iter().any(|path| spath.contains(path))
938952
&& (spath.ends_with(".ll") || spath.ends_with(".td") || spath.ends_with(".s"))

0 commit comments

Comments
 (0)