try to reduce memory usage on aarch64 and i386: - reduce memory use by retaining fewer names within compilation artifacts - divise (with codegen-units) the unit in smaller parts to manipulate it Index: src/bootstrap/bin/rustc.rs --- src/bootstrap/bin/rustc.rs.orig +++ src/bootstrap/bin/rustc.rs @@ -114,6 +114,19 @@ fn main() { { cmd.arg("-Ztls-model=initial-exec"); } + + if target.unwrap().contains("aarch64-unknown-openbsd") + && crate_name == Some("rustc") + { + cmd.arg("-Z").arg("fewer-names"); + } + if target.unwrap().contains("i686-unknown-openbsd") + && crate_name == Some("rustc_middle") + { + cmd.arg("-Z").arg("fewer-names"); + cmd.arg("-C").arg("codegen-units=64"); + } + } else { // FIXME(rust-lang/cargo#5754) we shouldn't be using special env vars // here, but rather Cargo should know what flags to pass rustc itself.