about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-12-27 16:03:01 +0000
committerbors <bors@rust-lang.org>2020-12-27 16:03:01 +0000
commit76188b6830897a875a1289809c12b5c5d69bb7ef (patch)
tree8377b4c17ee3e2a5adb1e5c13660df6421b8d6bd /src/bootstrap
parent2fab3214352e13046c808c066672770df8427d97 (diff)
parent32716814a2d9a26674503122d0b91aca39e5ab28 (diff)
downloadrust-76188b6830897a875a1289809c12b5c5d69bb7ef.tar.gz
rust-76188b6830897a875a1289809c12b5c5d69bb7ef.zip
Auto merge of #80315 - tmiasko:ignore-proc-macros, r=Mark-Simulacrum
Ignore proc-macros when assembling rustc libdir

Fixes #80294.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/compile.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 091bd2a1c5a..2707a640457 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -7,6 +7,7 @@
 //! goes along from the output of the previous stage.
 
 use std::borrow::Cow;
+use std::collections::HashSet;
 use std::env;
 use std::fs;
 use std::io::prelude::*;
@@ -991,13 +992,26 @@ impl Step for Assemble {
         builder.info(&format!("Assembling stage{} compiler ({})", stage, host));
 
         // Link in all dylibs to the libdir
+        let stamp = librustc_stamp(builder, build_compiler, target_compiler.host);
+        let proc_macros = builder
+            .read_stamp_file(&stamp)
+            .into_iter()
+            .filter_map(|(path, dependency_type)| {
+                if dependency_type == DependencyType::Host {
+                    Some(path.file_name().unwrap().to_owned().into_string().unwrap())
+                } else {
+                    None
+                }
+            })
+            .collect::<HashSet<_>>();
+
         let sysroot = builder.sysroot(target_compiler);
         let rustc_libdir = builder.rustc_libdir(target_compiler);
         t!(fs::create_dir_all(&rustc_libdir));
         let src_libdir = builder.sysroot_libdir(build_compiler, host);
         for f in builder.read_dir(&src_libdir) {
             let filename = f.file_name().into_string().unwrap();
-            if is_dylib(&filename) {
+            if is_dylib(&filename) && !proc_macros.contains(&filename) {
                 builder.copy(&f.path(), &rustc_libdir.join(&filename));
             }
         }