From 8fb0b498dbc811cbc0954ba8911d326bb333053f Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 21 Nov 2023 11:51:10 +0900 Subject: [PATCH] Remove unneeded MLGO cflag For LTO compilation, we do not need MLGO flags in cflags, since codegen happens during link only. Fixes compiler warnings for unused command line argument. Test: presubmit Change-Id: I361e4292b10a3582fd5c69fa7b5678c654b44a0f --- cc/lto.go | 1 - 1 file changed, 1 deletion(-) diff --git a/cc/lto.go b/cc/lto.go index ad1a1b1cf..30d7b7578 100644 --- a/cc/lto.go +++ b/cc/lto.go @@ -150,7 +150,6 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags { if !ctx.Config().IsEnvFalse("THINLTO_USE_MLGO") { // Register allocation MLGO flags for ARM64. if ctx.Arch().ArchType == android.Arm64 { - ltoCFlags = append(ltoCFlags, "-mllvm -regalloc-enable-advisor=release") ltoLdFlags = append(ltoLdFlags, "-Wl,-mllvm,-regalloc-enable-advisor=release") } // Flags for training MLGO model.