From 1b65e2988b465fec76e5fc0266bd79d9251a3ec9 Mon Sep 17 00:00:00 2001 From: Erik Desjardins Date: Thu, 14 Mar 2024 20:18:48 -0400 Subject: [PATCH] build core, alloc, std with 1 CGU --- Cargo.toml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 5dd315ef2f7c6..312c40ecf964b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,6 +65,14 @@ exclude = [ "library/stdarch", ] +# Building these core crates with 1 CGU makes them a lot smaller. +[profile.release.package.core] +codegen-units = 1 +[profile.release.package.alloc] +codegen-units = 1 +[profile.release.package.std] +codegen-units = 1 + [profile.release.package.compiler_builtins] # The compiler-builtins crate cannot reference libcore, and its own CI will # verify that this is the case. This requires, however, that the crate is built