Skip to content

Commit f05b20a

Browse files
committed
bootstrap: x.py dist rustc-src should keep LLVM's siphash
1 parent 2886b36 commit f05b20a

File tree

1 file changed

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

1 file changed

+12
-0
lines changed

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

Lines changed: 12 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,16 @@ 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+
&& !LLVM_THIRD_PARTY.iter().any(|path| spath.contains(path))
944+
{
945+
return false;
946+
}
947+
936948
const LLVM_TEST: &[&str] = &["llvm-project/llvm/test", "llvm-project\\llvm\\test"];
937949
if LLVM_TEST.iter().any(|path| spath.contains(path))
938950
&& (spath.ends_with(".ll") || spath.ends_with(".td") || spath.ends_with(".s"))

0 commit comments

Comments
 (0)