Prepend AFDO flags to allow overriding am: a1961e7eed
am: 6e9440fbee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2501638 Change-Id: I3ca783a6635ec9fe0b2958356e067ba4fa2710be Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -71,10 +71,10 @@ func (afdo *afdo) afdoEnabled() bool {
|
||||
|
||||
func (afdo *afdo) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
if path := afdo.Properties.FdoProfilePath; path != nil {
|
||||
// The flags are prepended to allow overriding.
|
||||
profileUseFlag := fmt.Sprintf(afdoCFlagsFormat, *path)
|
||||
flags.Local.CFlags = append(flags.Local.CFlags, profileUseFlag)
|
||||
flags.Local.LdFlags = append(flags.Local.LdFlags, profileUseFlag)
|
||||
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-mllvm,-no-warn-sample-unused=true")
|
||||
flags.Local.CFlags = append([]string{profileUseFlag}, flags.Local.CFlags...)
|
||||
flags.Local.LdFlags = append([]string{profileUseFlag, "-Wl,-mllvm,-no-warn-sample-unused=true"}, flags.Local.LdFlags...)
|
||||
|
||||
// Update CFlagsDeps and LdFlagsDeps so the module is rebuilt
|
||||
// if profileFile gets updated
|
||||
|
Reference in New Issue
Block a user