From 196b926ac2384466fe92d4b068d3116b91a09bac Mon Sep 17 00:00:00 2001 From: Yi Kong Date: Tue, 7 Dec 2021 13:51:38 +0800 Subject: [PATCH] Move "-fdebug-info-for-profiling" flag to device binaries only We do not profile host binaries. Moving to device binaries only helps saving some disk space as well as shortening build time. Test: presubmit Change-Id: I09afb106d0e2ee250b3bc75d9dfd9cb8b6552c97 --- cc/config/global.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cc/config/global.go b/cc/config/global.go index 0b229be76..a340e465e 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -46,7 +46,6 @@ var ( "-O2", "-g", - "-fdebug-info-for-profiling", "-fno-strict-aliasing", @@ -125,6 +124,9 @@ var ( "-Werror=sequence-point", "-Werror=format-security", "-nostdlibinc", + + // Emit additional debug info for AutoFDO + "-fdebug-info-for-profiling", } deviceGlobalCppflags = []string{