diff --git a/build_sysroot/Cargo.toml b/build_sysroot/Cargo.toml index e5658273c978a..f46c9c8ce157e 100644 --- a/build_sysroot/Cargo.toml +++ b/build_sysroot/Cargo.toml @@ -18,5 +18,5 @@ rustc-std-workspace-alloc = { path = "./sysroot_src/library/rustc-std-workspace- rustc-std-workspace-std = { path = "./sysroot_src/library/rustc-std-workspace-std" } [profile.release] -debug = true +debug = "limited" #lto = "fat" # TODO(antoyo): re-enable when the failing LTO tests regarding proc-macros are fixed. diff --git a/build_system/src/config.rs b/build_system/src/config.rs index 0a7258958e7e9..4cda356301ada 100644 --- a/build_system/src/config.rs +++ b/build_system/src/config.rs @@ -424,7 +424,7 @@ impl ConfigInfo { rustflags.push("-Csymbol-mangling-version=v0".to_string()); } - rustflags.push("-Cdebuginfo=2".to_string()); + // Since we don't support ThinLTO, disable LTO completely when not trying to do LTO. // TODO(antoyo): remove when we can handle ThinLTO.