Drive instrumentation with build flag for C/C++
Bug: 328444881 Test: m Change-Id: I20c92c61f855adb772d6aa173e85a6d8092460d7
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
|||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -152,6 +153,7 @@ func (this *CcAconfigLibraryCallbacks) GeneratorBuildActions(ctx cc.ModuleContex
|
|||||||
Args: map[string]string{
|
Args: map[string]string{
|
||||||
"gendir": this.generatedDir.String(),
|
"gendir": this.generatedDir.String(),
|
||||||
"mode": mode,
|
"mode": mode,
|
||||||
|
"debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorageCc()),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@@ -49,11 +49,12 @@ var (
|
|||||||
` && ${aconfig} create-cpp-lib` +
|
` && ${aconfig} create-cpp-lib` +
|
||||||
` --mode ${mode}` +
|
` --mode ${mode}` +
|
||||||
` --cache ${in}` +
|
` --cache ${in}` +
|
||||||
` --out ${gendir}`,
|
` --out ${gendir}` +
|
||||||
|
` --allow-instrumentation ${debug}`,
|
||||||
CommandDeps: []string{
|
CommandDeps: []string{
|
||||||
"$aconfig",
|
"$aconfig",
|
||||||
},
|
},
|
||||||
}, "gendir", "mode")
|
}, "gendir", "mode", "debug")
|
||||||
|
|
||||||
// For rust_aconfig_library: Generate Rust library
|
// For rust_aconfig_library: Generate Rust library
|
||||||
rustRule = pctx.AndroidStaticRule("rust_aconfig_library",
|
rustRule = pctx.AndroidStaticRule("rust_aconfig_library",
|
||||||
|
@@ -229,6 +229,11 @@ func (c Config) ReleaseNdkAbiMonitored() bool {
|
|||||||
return c.config.productVariables.GetBuildFlagBool("RELEASE_NDK_ABI_MONITORED")
|
return c.config.productVariables.GetBuildFlagBool("RELEASE_NDK_ABI_MONITORED")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Enable read flag from new storage, for C/C++
|
||||||
|
func (c Config) ReleaseReadFromNewStorageCc() bool {
|
||||||
|
return c.config.productVariables.GetBuildFlagBool("RELEASE_READ_FROM_NEW_STORAGE_CC")
|
||||||
|
}
|
||||||
|
|
||||||
func (c Config) ReleaseHiddenApiExportableStubs() bool {
|
func (c Config) ReleaseHiddenApiExportableStubs() bool {
|
||||||
return c.config.productVariables.GetBuildFlagBool("RELEASE_HIDDEN_API_EXPORTABLE_STUBS") ||
|
return c.config.productVariables.GetBuildFlagBool("RELEASE_HIDDEN_API_EXPORTABLE_STUBS") ||
|
||||||
Bool(c.config.productVariables.HiddenapiExportableStubs)
|
Bool(c.config.productVariables.HiddenapiExportableStubs)
|
||||||
|
Reference in New Issue
Block a user