This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -1892,14 +1892,12 @@ pub fn run_cargo(
18921892 || filename. ends_with ( ".a" )
18931893 || is_debug_info ( & filename)
18941894 || is_dylib ( & filename)
1895+ || filename. ends_with ( ".rmeta" )
18951896 {
1896- // Always keep native libraries, rust dylibs and debuginfo
1897+ // Always keep native libraries, rust dylibs, debuginfo and crate metadata
18971898 keep = true ;
18981899 }
1899- if is_check && filename. ends_with ( ".rmeta" ) {
1900- // During check builds we need to keep crate metadata
1901- keep = true ;
1902- } else if rlib_only_metadata {
1900+ if !is_check && rlib_only_metadata {
19031901 if filename. contains ( "jemalloc_sys" )
19041902 || filename. contains ( "rustc_smir" )
19051903 || filename. contains ( "stable_mir" )
@@ -1911,7 +1909,6 @@ pub fn run_cargo(
19111909 // Distribute the rest of the rustc crates as rmeta files only to reduce
19121910 // the tarball sizes by about 50%. The object files are linked into
19131911 // librustc_driver.so, so it is still possible to link against them.
1914- keep |= filename. ends_with ( ".rmeta" ) ;
19151912 }
19161913 } else {
19171914 // In all other cases keep all rlibs
You can’t perform that action at this time.
0 commit comments