From 3983413f13bc0c1a4d410425ca63e693cdc78bd9 Mon Sep 17 00:00:00 2001 From: Satish Yalla Date: Thu, 30 Jan 2025 20:59:55 -0800 Subject: Revert "Do not perform LTO for Rust binaries during eng builds" This reverts commit ce48f5f396e37516e8f29680f4b5c7071375f2fc. Reason for revert: Droidmonitor created revert due to b/393452310. Will be verified through ABTD for standarrd investigation. Change-Id: I6a4ce6bcb23a4c515aba1ef4eb9995d85a5fdda8 --- rust/compiler.go | 5 ----- 1 file changed, 5 deletions(-) (limited to 'rust/compiler.go') diff --git a/rust/compiler.go b/rust/compiler.go index 8ea5769a0..1d2fb58c3 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -450,11 +450,6 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags) Flag } } - // Enable LTO for non-engineering builds if the module supports and requests it. - if !ctx.Config().Eng() && !(ctx.RustModule().Rlib() || ctx.RustModule().ProcMacro()) && ctx.RustModule().compiler.Thinlto() { - flags.GlobalRustFlags = append(flags.GlobalRustFlags, "-C lto=thin") - } - flags.RustFlags = append(flags.RustFlags, lintFlags) flags.RustFlags = append(flags.RustFlags, compiler.Properties.Flags...) flags.RustFlags = append(flags.RustFlags, "--edition="+compiler.edition()) -- cgit v1.2.3-59-g8ed1b