Add "-no-warn-sample-unuse=true" to work around AutoFDO issue
Autofdo generates profile for an instruction even if there is no debug information associated with it or no debug information associated with the function. A bogus offset will be produced in the profile. Add the flag to suppress Clang from generating error for such cases. Test: build with ETM profile Bug: 147844018 Bug: 79161490 Change-Id: I37da1ba3a4962072ccdf01f79fbf2c2b4c77b56b
This commit is contained in:
@@ -177,6 +177,10 @@ func (props *PgoProperties) addProfileUseFlags(ctx ModuleContext, flags Flags) F
|
|||||||
// if profileFile gets updated
|
// if profileFile gets updated
|
||||||
flags.CFlagsDeps = append(flags.CFlagsDeps, profileFilePath)
|
flags.CFlagsDeps = append(flags.CFlagsDeps, profileFilePath)
|
||||||
flags.LdFlagsDeps = append(flags.LdFlagsDeps, profileFilePath)
|
flags.LdFlagsDeps = append(flags.LdFlagsDeps, profileFilePath)
|
||||||
|
|
||||||
|
if props.isSampling() {
|
||||||
|
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-mllvm,-no-warn-sample-unused=true")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flags
|
return flags
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user