]> git.lizzy.rs Git - rust.git/commitdiff
Don't package up libLLVM.so with libstd
authorAlex Crichton <alex@alexcrichton.com>
Wed, 2 Jan 2019 21:07:26 +0000 (13:07 -0800)
committerAlex Crichton <alex@alexcrichton.com>
Wed, 2 Jan 2019 21:07:26 +0000 (13:07 -0800)
It's only meant for rustc, so we should only install it once!

src/bootstrap/dist.rs

index 97a359639cb83a0dc3cd4efe5461d4d6479ec71c..38869bf441a827607a63e768363bbda1f8ce7431 100644 (file)
@@ -671,10 +671,18 @@ fn run(self, builder: &Builder) -> PathBuf {
         let mut src = builder.sysroot_libdir(compiler, target).to_path_buf();
         src.pop(); // Remove the trailing /lib folder from the sysroot_libdir
         builder.cp_filtered(&src, &dst, &|path| {
-            let name = path.file_name().and_then(|s| s.to_str());
-            name != Some(builder.config.rust_codegen_backends_dir.as_str()) &&
-                name != Some("bin")
-
+            if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
+                if name == builder.config.rust_codegen_backends_dir.as_str() {
+                    return false
+                }
+                if name == "bin" {
+                    return false
+                }
+                if name.contains("LLVM") {
+                    return false
+                }
+            }
+            true
         });
 
         let mut cmd = rust_installer(builder);