Merge changes Iaab7a588,I7bc1d1f3
* changes:
Use jars containg sources for java generators
Pass output file names into java.Transform* functions
diff --git a/cc/pgo.go b/cc/pgo.go
index c5e4e86..ea23124 100644
--- a/cc/pgo.go
+++ b/cc/pgo.go
@@ -37,10 +37,11 @@
type PgoProperties struct {
Pgo struct {
- Instrumentation *bool
- Sampling *bool
- Profile_file *string `android:"arch_variant"`
- Benchmarks []string
+ Instrumentation *bool
+ Sampling *bool
+ Profile_file *string `android:"arch_variant"`
+ Benchmarks []string
+ Enable_profile_use *bool `android:"arch_variant"`
} `android:"arch_variant"`
PgoPresent bool `blueprint:"mutated"`
@@ -95,6 +96,11 @@
}
func (props *PgoProperties) addProfileUseFlags(ctx ModuleContext, flags Flags) Flags {
+ // Skip -fprofile-use if 'enable_profile_use' property is set
+ if props.Pgo.Enable_profile_use != nil && *props.Pgo.Enable_profile_use == false {
+ return flags
+ }
+
// If the PGO profiles project is found, and this module has PGO
// enabled, add flags to use the profile
if profilesDir := getPgoProfilesDir(ctx); props.PgoPresent && profilesDir.Valid() {