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(
1892
1892
|| filename. ends_with ( ".a" )
1893
1893
|| is_debug_info ( & filename)
1894
1894
|| is_dylib ( & filename)
1895
+ || filename. ends_with ( ".rmeta" )
1895
1896
{
1896
- // Always keep native libraries, rust dylibs and debuginfo
1897
+ // Always keep native libraries, rust dylibs, debuginfo and crate metadata
1897
1898
keep = true ;
1898
1899
}
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 {
1903
1901
if filename. contains ( "jemalloc_sys" )
1904
1902
|| filename. contains ( "rustc_smir" )
1905
1903
|| filename. contains ( "stable_mir" )
@@ -1911,7 +1909,6 @@ pub fn run_cargo(
1911
1909
// Distribute the rest of the rustc crates as rmeta files only to reduce
1912
1910
// the tarball sizes by about 50%. The object files are linked into
1913
1911
// librustc_driver.so, so it is still possible to link against them.
1914
- keep |= filename. ends_with ( ".rmeta" ) ;
1915
1912
}
1916
1913
} else {
1917
1914
// In all other cases keep all rlibs
You can’t perform that action at this time.
0 commit comments