Merge "Tag removed APIs as such in hiddenapi_flags.csv."
diff --git a/android/androidmk.go b/android/androidmk.go
index ddd51ff..cfd7c91 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -72,6 +72,7 @@
type AndroidMkEntries struct {
Class string
SubName string
+ OverrideName string
DistFiles TaggedDistFiles
OutputFile OptionalPath
Disabled bool
@@ -273,6 +274,9 @@
a.EntryMap = make(map[string][]string)
amod := mod.(Module).base()
name := amod.BaseModuleName()
+ if a.OverrideName != "" {
+ name = a.OverrideName
+ }
if a.Include == "" {
a.Include = "$(BUILD_PREBUILT)"
diff --git a/android/arch.go b/android/arch.go
index f505ec6..98ff07a 100644
--- a/android/arch.go
+++ b/android/arch.go
@@ -914,8 +914,8 @@
osTargets = targets
}
- // only the primary arch in the ramdisk / recovery partition
- if os == Android && (module.InstallInRecovery() || module.InstallInRamdisk()) {
+ // only the primary arch in the ramdisk / vendor_ramdisk / recovery partition
+ if os == Android && (module.InstallInRecovery() || module.InstallInRamdisk() || module.InstallInVendorRamdisk()) {
osTargets = []Target{osTargets[0]}
}
@@ -1717,7 +1717,7 @@
func getAmlAbisConfig() []archConfig {
return []archConfig{
- {"arm", "armv7-a", "", []string{"armeabi-v7a"}},
+ {"arm", "armv7-a-neon", "", []string{"armeabi-v7a"}},
{"arm64", "armv8-a", "", []string{"arm64-v8a"}},
{"x86", "", "", []string{"x86"}},
{"x86_64", "", "", []string{"x86_64"}},
diff --git a/android/config.go b/android/config.go
index cf6d596..004b743 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1312,6 +1312,10 @@
return c.config.productVariables.BoardKernelModuleInterfaceVersions
}
+func (c *deviceConfig) BoardMoveRecoveryResourcesToVendorBoot() bool {
+ return Bool(c.config.productVariables.BoardMoveRecoveryResourcesToVendorBoot)
+}
+
// The ConfiguredJarList struct provides methods for handling a list of (apex, jar) pairs.
// Such lists are used in the build system for things like bootclasspath jars or system server jars.
// The apex part is either an apex name, or a special names "platform" or "system_ext". Jar is a
diff --git a/android/defs.go b/android/defs.go
index 83daa03..2b1bd85 100644
--- a/android/defs.go
+++ b/android/defs.go
@@ -69,8 +69,9 @@
// A symlink rule.
Symlink = pctx.AndroidStaticRule("Symlink",
blueprint.RuleParams{
- Command: "rm -f $out && ln -f -s $fromPath $out",
- Description: "symlink $out",
+ Command: "rm -f $out && ln -f -s $fromPath $out",
+ Description: "symlink $out",
+ SymlinkOutputs: []string{"$out"},
},
"fromPath")
diff --git a/android/image.go b/android/image.go
index 061bfa5..1a1a423 100644
--- a/android/image.go
+++ b/android/image.go
@@ -26,6 +26,10 @@
// ramdisk partition).
RamdiskVariantNeeded(ctx BaseModuleContext) bool
+ // VendorRamdiskVariantNeeded should return true if the module needs a vendor ramdisk variant (installed on the
+ // vendor ramdisk partition).
+ VendorRamdiskVariantNeeded(ctx BaseModuleContext) bool
+
// RecoveryVariantNeeded should return true if the module needs a recovery variant (installed on the
// recovery partition).
RecoveryVariantNeeded(ctx BaseModuleContext) bool
@@ -53,6 +57,9 @@
// RamdiskVariation means a module to be installed to ramdisk image.
RamdiskVariation string = "ramdisk"
+
+ // VendorRamdiskVariation means a module to be installed to vendor ramdisk image.
+ VendorRamdiskVariation string = "vendor_ramdisk"
)
// imageMutator creates variants for modules that implement the ImageInterface that
@@ -73,6 +80,9 @@
if m.RamdiskVariantNeeded(ctx) {
variations = append(variations, RamdiskVariation)
}
+ if m.VendorRamdiskVariantNeeded(ctx) {
+ variations = append(variations, VendorRamdiskVariation)
+ }
if m.RecoveryVariantNeeded(ctx) {
variations = append(variations, RecoveryVariation)
}
diff --git a/android/makefile_goal.go b/android/makefile_goal.go
index eae3976..b5d9d69 100644
--- a/android/makefile_goal.go
+++ b/android/makefile_goal.go
@@ -93,7 +93,6 @@
func MakefileGoalFactory() Module {
module := &makefileGoal{}
module.AddProperties(&module.properties)
- // This module is device-only
- InitAndroidArchModule(module, DeviceSupported, MultilibFirst)
+ InitAndroidModule(module)
return module
}
diff --git a/android/module.go b/android/module.go
index 822e5bd..d677406 100644
--- a/android/module.go
+++ b/android/module.go
@@ -43,6 +43,8 @@
Description string
Output WritablePath
Outputs WritablePaths
+ SymlinkOutput WritablePath
+ SymlinkOutputs WritablePaths
ImplicitOutput WritablePath
ImplicitOutputs WritablePaths
Input Path
@@ -346,6 +348,7 @@
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRamdisk() bool
+ InstallInVendorRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -401,6 +404,7 @@
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRamdisk() bool
+ InstallInVendorRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -621,6 +625,9 @@
// Whether this module is installed to ramdisk
Ramdisk *bool
+ // Whether this module is installed to vendor ramdisk
+ Vendor_ramdisk *bool
+
// Whether this module is built for non-native architecures (also known as native bridge binary)
Native_bridge_supported *bool `android:"arch_variant"`
@@ -1272,6 +1279,10 @@
return Bool(m.commonProperties.Ramdisk)
}
+func (m *ModuleBase) InstallInVendorRamdisk() bool {
+ return Bool(m.commonProperties.Vendor_ramdisk)
+}
+
func (m *ModuleBase) InstallInRecovery() bool {
return Bool(m.commonProperties.Recovery)
}
@@ -1321,6 +1332,10 @@
return m.base().commonProperties.ImageVariation == RamdiskVariation
}
+func (m *ModuleBase) InVendorRamdisk() bool {
+ return m.base().commonProperties.ImageVariation == VendorRamdiskVariation
+}
+
func (m *ModuleBase) InRecovery() bool {
return m.base().commonProperties.ImageVariation == RecoveryVariation
}
@@ -1763,6 +1778,27 @@
m.Build(pctx, BuildParams(params))
}
+func validateBuildParams(params blueprint.BuildParams) error {
+ // Validate that the symlink outputs are declared outputs or implicit outputs
+ allOutputs := map[string]bool{}
+ for _, output := range params.Outputs {
+ allOutputs[output] = true
+ }
+ for _, output := range params.ImplicitOutputs {
+ allOutputs[output] = true
+ }
+ for _, symlinkOutput := range params.SymlinkOutputs {
+ if !allOutputs[symlinkOutput] {
+ return fmt.Errorf(
+ "Symlink output %s is not a declared output or implicit output",
+ symlinkOutput)
+ }
+ }
+ return nil
+}
+
+// Convert build parameters from their concrete Android types into their string representations,
+// and combine the singular and plural fields of the same type (e.g. Output and Outputs).
func convertBuildParams(params BuildParams) blueprint.BuildParams {
bparams := blueprint.BuildParams{
Rule: params.Rule,
@@ -1770,6 +1806,7 @@
Deps: params.Deps,
Outputs: params.Outputs.Strings(),
ImplicitOutputs: params.ImplicitOutputs.Strings(),
+ SymlinkOutputs: params.SymlinkOutputs.Strings(),
Inputs: params.Inputs.Strings(),
Implicits: params.Implicits.Strings(),
OrderOnly: params.OrderOnly.Strings(),
@@ -1784,6 +1821,9 @@
if params.Output != nil {
bparams.Outputs = append(bparams.Outputs, params.Output.String())
}
+ if params.SymlinkOutput != nil {
+ bparams.SymlinkOutputs = append(bparams.SymlinkOutputs, params.SymlinkOutput.String())
+ }
if params.ImplicitOutput != nil {
bparams.ImplicitOutputs = append(bparams.ImplicitOutputs, params.ImplicitOutput.String())
}
@@ -1799,6 +1839,7 @@
bparams.Outputs = proptools.NinjaEscapeList(bparams.Outputs)
bparams.ImplicitOutputs = proptools.NinjaEscapeList(bparams.ImplicitOutputs)
+ bparams.SymlinkOutputs = proptools.NinjaEscapeList(bparams.SymlinkOutputs)
bparams.Inputs = proptools.NinjaEscapeList(bparams.Inputs)
bparams.Implicits = proptools.NinjaEscapeList(bparams.Implicits)
bparams.OrderOnly = proptools.NinjaEscapeList(bparams.OrderOnly)
@@ -1855,7 +1896,15 @@
m.buildParams = append(m.buildParams, params)
}
- m.bp.Build(pctx.PackageContext, convertBuildParams(params))
+ bparams := convertBuildParams(params)
+ err := validateBuildParams(bparams)
+ if err != nil {
+ m.ModuleErrorf(
+ "%s: build parameter validation failed: %s",
+ m.ModuleName(),
+ err.Error())
+ }
+ m.bp.Build(pctx.PackageContext, bparams)
}
func (m *moduleContext) Phony(name string, deps ...Path) {
@@ -2188,6 +2237,10 @@
return m.module.InstallInRamdisk()
}
+func (m *moduleContext) InstallInVendorRamdisk() bool {
+ return m.module.InstallInVendorRamdisk()
+}
+
func (m *moduleContext) InstallInRecovery() bool {
return m.module.InstallInRecovery()
}
diff --git a/android/module_test.go b/android/module_test.go
index 6e648d7..3a039e2 100644
--- a/android/module_test.go
+++ b/android/module_test.go
@@ -187,3 +187,49 @@
_, errs = ctx.PrepareBuildActions(config)
FailIfNoMatchingErrors(t, `module "foo": depends on disabled module "bar"`, errs)
}
+
+func TestValidateCorrectBuildParams(t *testing.T) {
+ config := TestConfig(buildDir, nil, "", nil)
+ pathContext := PathContextForTesting(config)
+ bparams := convertBuildParams(BuildParams{
+ // Test with Output
+ Output: PathForOutput(pathContext, "undeclared_symlink"),
+ SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
+ })
+
+ err := validateBuildParams(bparams)
+ if err != nil {
+ t.Error(err)
+ }
+
+ bparams = convertBuildParams(BuildParams{
+ // Test with ImplicitOutput
+ ImplicitOutput: PathForOutput(pathContext, "undeclared_symlink"),
+ SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
+ })
+
+ err = validateBuildParams(bparams)
+ if err != nil {
+ t.Error(err)
+ }
+}
+
+func TestValidateIncorrectBuildParams(t *testing.T) {
+ config := TestConfig(buildDir, nil, "", nil)
+ pathContext := PathContextForTesting(config)
+ params := BuildParams{
+ Output: PathForOutput(pathContext, "regular_output"),
+ Outputs: PathsForOutput(pathContext, []string{"out1", "out2"}),
+ ImplicitOutput: PathForOutput(pathContext, "implicit_output"),
+ ImplicitOutputs: PathsForOutput(pathContext, []string{"i_out1", "_out2"}),
+ SymlinkOutput: PathForOutput(pathContext, "undeclared_symlink"),
+ }
+
+ bparams := convertBuildParams(params)
+ err := validateBuildParams(bparams)
+ if err != nil {
+ FailIfNoMatchingErrors(t, "undeclared_symlink is not a declared output or implicit output", []error{err})
+ } else {
+ t.Errorf("Expected build params to fail validation: %+v", bparams)
+ }
+}
diff --git a/android/paths.go b/android/paths.go
index 3825d45..4eb9d20 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -58,6 +58,7 @@
InstallInTestcases() bool
InstallInSanitizerDir() bool
InstallInRamdisk() bool
+ InstallInVendorRamdisk() bool
InstallInRecovery() bool
InstallInRoot() bool
InstallBypassMake() bool
@@ -1376,6 +1377,15 @@
if !ctx.InstallInRoot() {
partition += "/system"
}
+ } else if ctx.InstallInVendorRamdisk() {
+ if ctx.DeviceConfig().BoardMoveRecoveryResourcesToVendorBoot() {
+ partition = "recovery/root/first_stage_ramdisk"
+ } else {
+ partition = "vendor-ramdisk"
+ }
+ if !ctx.InstallInRoot() {
+ partition += "/system"
+ }
} else if ctx.InstallInRecovery() {
if ctx.InstallInRoot() {
partition = "recovery/root"
diff --git a/android/paths_test.go b/android/paths_test.go
index 108bd6c..9ecf4a1 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -200,14 +200,15 @@
type moduleInstallPathContextImpl struct {
baseModuleContext
- inData bool
- inTestcases bool
- inSanitizerDir bool
- inRamdisk bool
- inRecovery bool
- inRoot bool
- forceOS *OsType
- forceArch *ArchType
+ inData bool
+ inTestcases bool
+ inSanitizerDir bool
+ inRamdisk bool
+ inVendorRamdisk bool
+ inRecovery bool
+ inRoot bool
+ forceOS *OsType
+ forceArch *ArchType
}
func (m moduleInstallPathContextImpl) Config() Config {
@@ -232,6 +233,10 @@
return m.inRamdisk
}
+func (m moduleInstallPathContextImpl) InstallInVendorRamdisk() bool {
+ return m.inVendorRamdisk
+}
+
func (m moduleInstallPathContextImpl) InstallInRecovery() bool {
return m.inRecovery
}
diff --git a/android/rule_builder.go b/android/rule_builder.go
index afb5f4e..8dc9d6a 100644
--- a/android/rule_builder.go
+++ b/android/rule_builder.go
@@ -246,6 +246,41 @@
return outputList
}
+func (r *RuleBuilder) symlinkOutputSet() map[string]WritablePath {
+ symlinkOutputs := make(map[string]WritablePath)
+ for _, c := range r.commands {
+ for _, symlinkOutput := range c.symlinkOutputs {
+ symlinkOutputs[symlinkOutput.String()] = symlinkOutput
+ }
+ }
+ return symlinkOutputs
+}
+
+// SymlinkOutputs returns the list of paths that the executor (Ninja) would
+// verify, after build edge completion, that:
+//
+// 1) Created output symlinks match the list of paths in this list exactly (no more, no fewer)
+// 2) Created output files are *not* declared in this list.
+//
+// These symlink outputs are expected to be a subset of outputs or implicit
+// outputs, or they would fail validation at build param construction time
+// later, to support other non-rule-builder approaches for constructing
+// statements.
+func (r *RuleBuilder) SymlinkOutputs() WritablePaths {
+ symlinkOutputs := r.symlinkOutputSet()
+
+ var symlinkOutputList WritablePaths
+ for _, symlinkOutput := range symlinkOutputs {
+ symlinkOutputList = append(symlinkOutputList, symlinkOutput)
+ }
+
+ sort.Slice(symlinkOutputList, func(i, j int) bool {
+ return symlinkOutputList[i].String() < symlinkOutputList[j].String()
+ })
+
+ return symlinkOutputList
+}
+
func (r *RuleBuilder) depFileSet() map[string]WritablePath {
depFiles := make(map[string]WritablePath)
for _, c := range r.commands {
@@ -467,6 +502,7 @@
Implicits: r.Inputs(),
Output: output,
ImplicitOutputs: implicitOutputs,
+ SymlinkOutputs: r.SymlinkOutputs(),
Depfile: depFile,
Deps: depFormat,
Description: desc,
@@ -478,14 +514,15 @@
// RuleBuilderCommand, so they can be used chained or unchained. All methods that add text implicitly add a single
// space as a separator from the previous method.
type RuleBuilderCommand struct {
- buf strings.Builder
- inputs Paths
- implicits Paths
- orderOnlys Paths
- outputs WritablePaths
- depFiles WritablePaths
- tools Paths
- rspFileInputs Paths
+ buf strings.Builder
+ inputs Paths
+ implicits Paths
+ orderOnlys Paths
+ outputs WritablePaths
+ symlinkOutputs WritablePaths
+ depFiles WritablePaths
+ tools Paths
+ rspFileInputs Paths
// spans [start,end) of the command that should not be ninja escaped
unescapedSpans [][2]int
@@ -715,6 +752,40 @@
return c
}
+// ImplicitSymlinkOutput declares the specified path as an implicit output that
+// will be a symlink instead of a regular file. Does not modify the command
+// line.
+func (c *RuleBuilderCommand) ImplicitSymlinkOutput(path WritablePath) *RuleBuilderCommand {
+ c.symlinkOutputs = append(c.symlinkOutputs, path)
+ return c.ImplicitOutput(path)
+}
+
+// ImplicitSymlinkOutputs declares the specified paths as implicit outputs that
+// will be a symlinks instead of regular files. Does not modify the command
+// line.
+func (c *RuleBuilderCommand) ImplicitSymlinkOutputs(paths WritablePaths) *RuleBuilderCommand {
+ for _, path := range paths {
+ c.ImplicitSymlinkOutput(path)
+ }
+ return c
+}
+
+// SymlinkOutput declares the specified path as an output that will be a symlink
+// instead of a regular file. Modifies the command line.
+func (c *RuleBuilderCommand) SymlinkOutput(path WritablePath) *RuleBuilderCommand {
+ c.symlinkOutputs = append(c.symlinkOutputs, path)
+ return c.Output(path)
+}
+
+// SymlinkOutputsl declares the specified paths as outputs that will be symlinks
+// instead of regular files. Modifies the command line.
+func (c *RuleBuilderCommand) SymlinkOutputs(paths WritablePaths) *RuleBuilderCommand {
+ for _, path := range paths {
+ c.SymlinkOutput(path)
+ }
+ return c
+}
+
// ImplicitDepFile adds the specified depfile path to the paths returned by RuleBuilder.DepFiles without modifying
// the command line, and causes RuleBuilder.Build file to set the depfile flag for ninja. If multiple depfiles
// are added to commands in a single RuleBuilder then RuleBuilder.Build will add an extra command to merge the
diff --git a/android/rule_builder_test.go b/android/rule_builder_test.go
index c41b067..0d1070d 100644
--- a/android/rule_builder_test.go
+++ b/android/rule_builder_test.go
@@ -35,6 +35,7 @@
"a": nil,
"b": nil,
"ls": nil,
+ "ln": nil,
"turbine": nil,
"java": nil,
"javac": nil,
@@ -67,6 +68,32 @@
// outputs: ["out/linked"]
}
+func ExampleRuleBuilder_SymlinkOutputs() {
+ rule := NewRuleBuilder()
+
+ ctx := pathContext()
+
+ rule.Command().
+ Tool(PathForSource(ctx, "ln")).
+ FlagWithInput("-s ", PathForTesting("a.o")).
+ SymlinkOutput(PathForOutput(ctx, "a"))
+ rule.Command().Text("cp out/a out/b").
+ ImplicitSymlinkOutput(PathForOutput(ctx, "b"))
+
+ fmt.Printf("commands: %q\n", strings.Join(rule.Commands(), " && "))
+ fmt.Printf("tools: %q\n", rule.Tools())
+ fmt.Printf("inputs: %q\n", rule.Inputs())
+ fmt.Printf("outputs: %q\n", rule.Outputs())
+ fmt.Printf("symlink_outputs: %q\n", rule.SymlinkOutputs())
+
+ // Output:
+ // commands: "ln -s a.o out/a && cp out/a out/b"
+ // tools: ["ln"]
+ // inputs: ["a.o"]
+ // outputs: ["out/a" "out/b"]
+ // symlink_outputs: ["out/a" "out/b"]
+}
+
func ExampleRuleBuilder_Temporary() {
rule := NewRuleBuilder()
@@ -293,6 +320,8 @@
Input(PathForSource(ctx, "Input")).
Output(PathForOutput(ctx, "Output")).
OrderOnly(PathForSource(ctx, "OrderOnly")).
+ SymlinkOutput(PathForOutput(ctx, "SymlinkOutput")).
+ ImplicitSymlinkOutput(PathForOutput(ctx, "ImplicitSymlinkOutput")).
Text("Text").
Tool(PathForSource(ctx, "Tool"))
@@ -318,17 +347,18 @@
}
wantInputs := PathsForSource(ctx, []string{"Implicit", "Input", "input", "input2", "input3"})
- wantOutputs := PathsForOutput(ctx, []string{"ImplicitOutput", "Output", "output", "output2", "output3"})
+ wantOutputs := PathsForOutput(ctx, []string{"ImplicitOutput", "ImplicitSymlinkOutput", "Output", "SymlinkOutput", "output", "output2", "output3"})
wantDepFiles := PathsForOutput(ctx, []string{"DepFile", "depfile", "ImplicitDepFile", "depfile2"})
wantTools := PathsForSource(ctx, []string{"Tool", "tool2"})
wantOrderOnlys := PathsForSource(ctx, []string{"OrderOnly", "OrderOnlys"})
+ wantSymlinkOutputs := PathsForOutput(ctx, []string{"ImplicitSymlinkOutput", "SymlinkOutput"})
t.Run("normal", func(t *testing.T) {
rule := NewRuleBuilder()
addCommands(rule)
wantCommands := []string{
- "out/DepFile Flag FlagWithArg=arg FlagWithDepFile=out/depfile FlagWithInput=input FlagWithOutput=out/output Input out/Output Text Tool after command2 old cmd",
+ "out/DepFile Flag FlagWithArg=arg FlagWithDepFile=out/depfile FlagWithInput=input FlagWithOutput=out/output Input out/Output out/SymlinkOutput Text Tool after command2 old cmd",
"command2 out/depfile2 input2 out/output2 tool2",
"command3 input3 out/output2 out/output3",
}
@@ -345,6 +375,9 @@
if g, w := rule.Outputs(), wantOutputs; !reflect.DeepEqual(w, g) {
t.Errorf("\nwant rule.Outputs() = %#v\n got %#v", w, g)
}
+ if g, w := rule.SymlinkOutputs(), wantSymlinkOutputs; !reflect.DeepEqual(w, g) {
+ t.Errorf("\nwant rule.SymlinkOutputs() = %#v\n got %#v", w, g)
+ }
if g, w := rule.DepFiles(), wantDepFiles; !reflect.DeepEqual(w, g) {
t.Errorf("\nwant rule.DepFiles() = %#v\n got %#v", w, g)
}
@@ -365,7 +398,7 @@
addCommands(rule)
wantCommands := []string{
- "__SBOX_OUT_DIR__/DepFile Flag FlagWithArg=arg FlagWithDepFile=__SBOX_OUT_DIR__/depfile FlagWithInput=input FlagWithOutput=__SBOX_OUT_DIR__/output Input __SBOX_OUT_DIR__/Output Text Tool after command2 old cmd",
+ "__SBOX_OUT_DIR__/DepFile Flag FlagWithArg=arg FlagWithDepFile=__SBOX_OUT_DIR__/depfile FlagWithInput=input FlagWithOutput=__SBOX_OUT_DIR__/output Input __SBOX_OUT_DIR__/Output __SBOX_OUT_DIR__/SymlinkOutput Text Tool after command2 old cmd",
"command2 __SBOX_OUT_DIR__/depfile2 input2 __SBOX_OUT_DIR__/output2 tool2",
"command3 input3 __SBOX_OUT_DIR__/output2 __SBOX_OUT_DIR__/output3",
}
diff --git a/android/singleton.go b/android/singleton.go
index 9832378..bb6614d 100644
--- a/android/singleton.go
+++ b/android/singleton.go
@@ -168,6 +168,10 @@
s.buildParams = append(s.buildParams, params)
}
bparams := convertBuildParams(params)
+ err := validateBuildParams(bparams)
+ if err != nil {
+ s.Errorf("%s: build parameter validation failed: %s", s.Name(), err.Error())
+ }
s.SingletonContext.Build(pctx.PackageContext, bparams)
}
diff --git a/android/variable.go b/android/variable.go
index a9495cc..23fc6c2 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -90,6 +90,11 @@
Required []string
Host_required []string
Target_required []string
+ Strip struct {
+ All *bool
+ Keep_symbols *bool
+ Keep_symbols_and_debug_frame *bool
+ }
}
// eng is true for -eng builds, and can be used to turn on additionaly heavyweight debugging
@@ -347,6 +352,8 @@
BoardKernelBinaries []string `json:",omitempty"`
BoardKernelModuleInterfaceVersions []string `json:",omitempty"`
+
+ BoardMoveRecoveryResourcesToVendorBoot *bool `json:",omitempty"`
}
func boolPtr(v bool) *bool {
diff --git a/apex/allowed_deps.txt b/apex/allowed_deps.txt
index cd4b056..07e78af 100644
--- a/apex/allowed_deps.txt
+++ b/apex/allowed_deps.txt
@@ -154,7 +154,9 @@
crtend_so(minSdkVersion:16)
crtend_so(minSdkVersion:apex_inherit)
datastallprotosnano(minSdkVersion:29)
+derive_sdk(minSdkVersion:30)
derive_sdk(minSdkVersion:current)
+derive_sdk_prefer32(minSdkVersion:30)
derive_sdk_prefer32(minSdkVersion:current)
dnsresolver_aidl_interface-unstable-ndk_platform(minSdkVersion:29)
DocumentsUI-res-lib(minSdkVersion:29)
@@ -165,6 +167,7 @@
flatbuffer_headers(minSdkVersion:(no version))
fmtlib(minSdkVersion:29)
framework-permission(minSdkVersion:current)
+framework-sdkextensions(minSdkVersion:30)
framework-sdkextensions(minSdkVersion:current)
framework-statsd(minSdkVersion:current)
framework-tethering(minSdkVersion:current)
diff --git a/apex/apex.go b/apex/apex.go
index a9a58a6..b02711e 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -2075,7 +2075,7 @@
if to.AvailableFor(apexName) || baselineApexAvailable(apexName, toName) {
return true
}
- ctx.ModuleErrorf("%q requires %q that is not available for the APEX. Dependency path:%s", fromName, toName, ctx.GetPathString(true))
+ ctx.ModuleErrorf("%q requires %q that doesn't list the APEX under 'apex_available'. Dependency path:%s", fromName, toName, ctx.GetPathString(true))
// Visit this module's dependencies to check and report any issues with their availability.
return true
})
@@ -2383,11 +2383,12 @@
// system libraries.
if !am.DirectlyInAnyApex() {
// we need a module name for Make
- name := cc.BaseModuleName() + cc.Properties.SubName
- if proptools.Bool(a.properties.Use_vendor) {
+ name := cc.ImplementationModuleName(ctx)
+
+ if !proptools.Bool(a.properties.Use_vendor) {
// we don't use subName(.vendor) for a "use_vendor: true" apex
// which is supposed to be installed in /system
- name = cc.BaseModuleName()
+ name += cc.Properties.SubName
}
if !android.InList(name, a.requiredDeps) {
a.requiredDeps = append(a.requiredDeps, name)
diff --git a/apex/apex_test.go b/apex/apex_test.go
index c52fd04..fcd734c 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -1270,10 +1270,11 @@
system_shared_libs: [],
stl: "none",
stubs: { versions: ["29","30"] },
+ llndk_stubs: "libbar.llndk",
}
llndk_library {
- name: "libbar",
+ name: "libbar.llndk",
symbol_file: "",
}
`, func(fs map[string][]byte, config android.Config) {
@@ -4558,7 +4559,7 @@
func TestApexPropertiesShouldBeDefaultable(t *testing.T) {
// libfoo's apex_available comes from cc_defaults
- testApexError(t, `requires "libfoo" that is not available for the APEX`, `
+ testApexError(t, `requires "libfoo" that doesn't list the APEX under 'apex_available'.`, `
apex {
name: "myapex",
key: "myapex.key",
@@ -4592,7 +4593,7 @@
func TestApexAvailable_DirectDep(t *testing.T) {
// libfoo is not available to myapex, but only to otherapex
- testApexError(t, "requires \"libfoo\" that is not available for the APEX", `
+ testApexError(t, "requires \"libfoo\" that doesn't list the APEX under 'apex_available'.", `
apex {
name: "myapex",
key: "myapex.key",
@@ -4627,7 +4628,7 @@
func TestApexAvailable_IndirectDep(t *testing.T) {
// libbbaz is an indirect dep
- testApexError(t, `requires "libbaz" that is not available for the APEX. Dependency path:
+ testApexError(t, `requires "libbaz" that doesn't list the APEX under 'apex_available'. Dependency path:
.*via tag apex\.dependencyTag.*name:sharedLib.*
.*-> libfoo.*link:shared.*
.*via tag cc\.libraryDependencyTag.*Kind:sharedLibraryDependency.*
diff --git a/apex/builder.go b/apex/builder.go
index 7c125ef..ad673d6 100644
--- a/apex/builder.go
+++ b/apex/builder.go
@@ -21,6 +21,7 @@
"path/filepath"
"runtime"
"sort"
+ "strconv"
"strings"
"android/soong/android"
@@ -552,14 +553,16 @@
optFlags = append(optFlags, "--android_manifest "+androidManifestFile.String())
}
- targetSdkVersion := ctx.Config().DefaultAppTargetSdk(ctx).String()
- // TODO(b/157078772): propagate min_sdk_version to apexer.
- minSdkVersion := ctx.Config().DefaultAppTargetSdk(ctx).String()
-
moduleMinSdkVersion := a.minSdkVersion(ctx)
- if moduleMinSdkVersion.EqualTo(android.SdkVersion_Android10) {
- minSdkVersion = moduleMinSdkVersion.String()
+ minSdkVersion := moduleMinSdkVersion.String()
+
+ // bundletool doesn't understand what "current" is. We need to transform it to codename
+ if moduleMinSdkVersion.IsCurrent() {
+ minSdkVersion = ctx.Config().DefaultAppTargetSdk(ctx).String()
}
+ // apex module doesn't have a concept of target_sdk_version, hence for the time being
+ // targetSdkVersion == default targetSdkVersion of the branch.
+ targetSdkVersion := strconv.Itoa(ctx.Config().DefaultAppTargetSdk(ctx).FinalOrFutureInt())
if java.UseApiFingerprint(ctx) {
targetSdkVersion = ctx.Config().PlatformSdkCodename() + fmt.Sprintf(".$$(cat %s)", java.ApiFingerprintPath(ctx).String())
diff --git a/apex/vndk.go b/apex/vndk.go
index 93265c4..f4b12b5 100644
--- a/apex/vndk.go
+++ b/apex/vndk.go
@@ -152,7 +152,7 @@
}
// TODO(b/124106384): Clean up compat symlinks for ART binaries.
- if strings.HasPrefix(name, "com.android.art.") {
+ if name == "com.android.art" || strings.HasPrefix(name, "com.android.art.") {
addSymlink("/apex/com.android.art/bin/dalvikvm", "$(TARGET_OUT)/bin", "dalvikvm")
dex2oat := "dex2oat32"
if ctx.Config().Android64() {
diff --git a/cc/androidmk.go b/cc/androidmk.go
index e58a172..91eb886 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -24,15 +24,17 @@
)
var (
- nativeBridgeSuffix = ".native_bridge"
- productSuffix = ".product"
- vendorSuffix = ".vendor"
- ramdiskSuffix = ".ramdisk"
- recoverySuffix = ".recovery"
- sdkSuffix = ".sdk"
+ nativeBridgeSuffix = ".native_bridge"
+ productSuffix = ".product"
+ vendorSuffix = ".vendor"
+ ramdiskSuffix = ".ramdisk"
+ vendorRamdiskSuffix = ".vendor_ramdisk"
+ recoverySuffix = ".recovery"
+ sdkSuffix = ".sdk"
)
type AndroidMkContext interface {
+ BaseModuleName() string
Target() android.Target
subAndroidMk(*android.AndroidMkEntries, interface{})
Arch() android.Arch
@@ -42,6 +44,7 @@
VndkVersion() string
static() bool
InRamdisk() bool
+ InVendorRamdisk() bool
InRecovery() bool
AnyVariantDirectlyInAnyApex() bool
}
@@ -71,10 +74,11 @@
entries := android.AndroidMkEntries{
OutputFile: c.outputFile,
- // TODO(jiyong): add the APEXes providing shared libs to the required modules
- // Currently, adding c.Properties.ApexesProvidingSharedLibs is causing multiple
- // ART APEXes (com.android.art.debug|release) to be installed. And this
- // is breaking some older devices (like marlin) where system.img is small.
+ // TODO(jiyong): add the APEXes providing shared libs to the required
+ // modules Currently, adding c.Properties.ApexesProvidingSharedLibs is
+ // causing multiple ART APEXes (com.android.art and com.android.art.debug)
+ // to be installed. And this is breaking some older devices (like marlin)
+ // where system.img is small.
Required: c.Properties.AndroidMkRuntimeLibs,
Include: "$(BUILD_SYSTEM)/soong_cc_prebuilt.mk",
@@ -278,7 +282,7 @@
})
}
if len(library.Properties.Stubs.Versions) > 0 && !ctx.Host() && ctx.AnyVariantDirectlyInAnyApex() &&
- !ctx.InRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() && !ctx.static() {
+ !ctx.InRamdisk() && !ctx.InVendorRamdisk() && !ctx.InRecovery() && !ctx.UseVndk() && !ctx.static() {
if library.buildStubs() && library.isLatestStubVersion() {
// reference the latest version via its name without suffix when it is provided by apex
entries.SubName = ""
@@ -462,6 +466,7 @@
func (c *llndkStubDecorator) AndroidMkEntries(ctx AndroidMkContext, entries *android.AndroidMkEntries) {
entries.Class = "SHARED_LIBRARIES"
+ entries.OverrideName = c.implementationModuleName(ctx.BaseModuleName())
entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) {
c.libraryDecorator.androidMkWriteExportedFlags(entries)
@@ -482,12 +487,6 @@
entries.ExtraEntries = append(entries.ExtraEntries, func(entries *android.AndroidMkEntries) {
c.libraryDecorator.androidMkWriteExportedFlags(entries)
- path, file := filepath.Split(c.path.ToMakePath().String())
- stem, suffix, ext := android.SplitFileExt(file)
- entries.SetString("LOCAL_BUILT_MODULE_STEM", "$(LOCAL_MODULE)"+ext)
- entries.SetString("LOCAL_MODULE_SUFFIX", suffix)
- entries.SetString("LOCAL_MODULE_PATH", path)
- entries.SetString("LOCAL_MODULE_STEM", stem)
if c.tocFile.Valid() {
entries.SetString("LOCAL_SOONG_TOC", c.tocFile.String())
}
diff --git a/cc/binary.go b/cc/binary.go
index 7f7b619..70cf5ff 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -251,7 +251,7 @@
} else {
switch ctx.Os() {
case android.Android:
- if ctx.bootstrap() && !ctx.inRecovery() && !ctx.inRamdisk() {
+ if ctx.bootstrap() && !ctx.inRecovery() && !ctx.inRamdisk() && !ctx.inVendorRamdisk() {
flags.DynamicLinker = "/system/bin/bootstrap/linker"
} else {
flags.DynamicLinker = "/system/bin/linker"
@@ -446,7 +446,8 @@
// runtime APEX.
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !ctx.Host() && ctx.directlyInAnyApex() &&
- !translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() {
+ !translatedArch && ctx.apexVariationName() == "" && !ctx.inRamdisk() && !ctx.inRecovery() &&
+ !ctx.inVendorRamdisk() {
if ctx.Device() && isBionic(ctx.baseModuleName()) {
binary.installSymlinkToRuntimeApex(ctx, file)
diff --git a/cc/builder.go b/cc/builder.go
index 8c8aa17..81c09b1 100644
--- a/cc/builder.go
+++ b/cc/builder.go
@@ -44,14 +44,14 @@
blueprint.RuleParams{
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
- Command: "${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
+ Command: "$relPwd ${config.CcWrapper}$ccCmd -c $cFlags -MD -MF ${out}.d -o $out $in",
CommandDeps: []string{"$ccCmd"},
},
"ccCmd", "cFlags")
ccNoDeps = pctx.AndroidStaticRule("ccNoDeps",
blueprint.RuleParams{
- Command: "$ccCmd -c $cFlags -o $out $in",
+ Command: "$relPwd $ccCmd -c $cFlags -o $out $in",
CommandDeps: []string{"$ccCmd"},
},
"ccCmd", "cFlags")
@@ -220,7 +220,7 @@
Labels: map[string]string{"type": "abi-dump", "tool": "header-abi-dumper"},
ExecStrategy: "${config.REAbiDumperExecStrategy}",
Platform: map[string]string{
- remoteexec.PoolKey: "${config.RECXXPool}",
+ remoteexec.PoolKey: "${config.RECXXPool}",
},
}, []string{"cFlags", "exportDirs"}, nil)
diff --git a/cc/cc.go b/cc/cc.go
index dbe6346..c1a4327 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -84,6 +84,7 @@
ctx.TopDown("lto_deps", ltoDepsMutator)
ctx.BottomUp("lto", ltoMutator).Parallel()
+ ctx.BottomUp("check_linktype", checkLinkTypeMutator).Parallel()
ctx.TopDown("double_loadable", checkDoubleLoadableLibraries).Parallel()
})
@@ -257,14 +258,18 @@
// Make this module available when building for ramdisk
Ramdisk_available *bool
+ // Make this module available when building for vendor ramdisk
+ Vendor_ramdisk_available *bool
+
// Make this module available when building for recovery
Recovery_available *bool
// Set by imageMutator
- CoreVariantNeeded bool `blueprint:"mutated"`
- RamdiskVariantNeeded bool `blueprint:"mutated"`
- RecoveryVariantNeeded bool `blueprint:"mutated"`
- ExtraVariants []string `blueprint:"mutated"`
+ CoreVariantNeeded bool `blueprint:"mutated"`
+ RamdiskVariantNeeded bool `blueprint:"mutated"`
+ VendorRamdiskVariantNeeded bool `blueprint:"mutated"`
+ RecoveryVariantNeeded bool `blueprint:"mutated"`
+ ExtraVariants []string `blueprint:"mutated"`
// Allows this module to use non-APEX version of libraries. Useful
// for building binaries that are started before APEXes are activated.
@@ -352,6 +357,7 @@
inProduct() bool
inVendor() bool
inRamdisk() bool
+ inVendorRamdisk() bool
inRecovery() bool
shouldCreateSourceAbiDump() bool
selectedStl() string
@@ -946,7 +952,7 @@
}
func (c *Module) canUseSdk() bool {
- return c.Os() == android.Android && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery()
+ return c.Os() == android.Android && !c.UseVndk() && !c.InRamdisk() && !c.InRecovery() && !c.InVendorRamdisk()
}
func (c *Module) UseSdk() bool {
@@ -1040,6 +1046,16 @@
return false
}
+// If this is a stubs library, ImplementationModuleName returns the name of the module that contains
+// the implementation. If it is an implementation library it returns its own name.
+func (c *Module) ImplementationModuleName(ctx android.BaseModuleContext) string {
+ name := ctx.OtherModuleName(c)
+ if versioned, ok := c.linker.(versionedInterface); ok {
+ name = versioned.implementationModuleName(name)
+ }
+ return name
+}
+
func (c *Module) bootstrap() bool {
return Bool(c.Properties.Bootstrap)
}
@@ -1396,6 +1412,8 @@
c.Properties.SubName += vendorSuffix
} else if c.InRamdisk() && !c.OnlyInRamdisk() {
c.Properties.SubName += ramdiskSuffix
+ } else if c.InVendorRamdisk() && !c.OnlyInVendorRamdisk() {
+ c.Properties.SubName += vendorRamdiskSuffix
} else if c.InRecovery() && !c.OnlyInRecovery() {
c.Properties.SubName += recoverySuffix
} else if c.IsSdkVariant() && (c.Properties.SdkAndPlatformVariantVisibleToMake || c.SplitPerApiLevel()) {
@@ -1508,7 +1526,7 @@
// module is marked with 'bootstrap: true').
if c.HasStubsVariants() && c.AnyVariantDirectlyInAnyApex() && !c.InRamdisk() &&
!c.InRecovery() && !c.UseVndk() && !c.static() && !c.isCoverageVariant() &&
- c.IsStubs() {
+ c.IsStubs() && !c.InVendorRamdisk() {
c.Properties.HideFromMake = false // unhide
// Note: this is still non-installable
}
@@ -2004,7 +2022,7 @@
// Whether a module can link to another module, taking into
// account NDK linking.
-func checkLinkType(ctx android.ModuleContext, from LinkableInterface, to LinkableInterface,
+func checkLinkType(ctx android.BaseModuleContext, from LinkableInterface, to LinkableInterface,
tag blueprint.DependencyTag) {
switch t := tag.(type) {
@@ -2044,6 +2062,10 @@
// Ramdisk code is not NDK
return
}
+ if from.InVendorRamdisk() {
+ // Vendor ramdisk code is not NDK
+ return
+ }
if from.InRecovery() {
// Recovery code is not NDK
return
@@ -2124,6 +2146,18 @@
}
}
+func checkLinkTypeMutator(ctx android.BottomUpMutatorContext) {
+ if c, ok := ctx.Module().(*Module); ok {
+ ctx.VisitDirectDeps(func(dep android.Module) {
+ depTag := ctx.OtherModuleDependencyTag(dep)
+ ccDep, ok := dep.(LinkableInterface)
+ if ok {
+ checkLinkType(ctx, c, ccDep, depTag)
+ }
+ })
+ }
+}
+
// Tests whether the dependent library is okay to be double loaded inside a single process.
// If a library has a vendor variant and is a (transitive) dependency of an LLNDK library,
// it is subject to be double loaded. Such lib should be explicitly marked as double_loadable: true
@@ -2132,15 +2166,15 @@
check := func(child, parent android.Module) bool {
to, ok := child.(*Module)
if !ok {
- // follow thru cc.Defaults, etc.
- return true
+ return false
}
if lib, ok := to.linker.(*libraryDecorator); !ok || !lib.shared() {
return false
}
- // if target lib has no vendor variant, keep checking dependency graph
+ // Even if target lib has no vendor variant, keep checking dependency graph
+ // in case it depends on vendor_available but not double_loadable transtively.
if !to.HasVendorVariant() {
return true
}
@@ -2304,8 +2338,6 @@
return
}
- checkLinkType(ctx, c, ccDep, depTag)
-
linkFile := ccDep.OutputFile()
if libDepTag, ok := depTag.(libraryDependencyTag); ok {
@@ -2348,7 +2380,7 @@
} else if apexInfo.IsForPlatform() {
// If not building for APEX, use stubs only when it is from
// an APEX (and not from platform)
- // However, for host, ramdisk, recovery or bootstrap modules,
+ // However, for host, ramdisk, vendor_ramdisk, recovery or bootstrap modules,
// always link to non-stub variant
useStubs = dep.(android.ApexModule).AnyVariantDirectlyInAnyApex() && !c.bootstrap()
// Another exception: if this module is bundled with an APEX, then
@@ -2642,7 +2674,8 @@
}
}
- if ctx.DeviceConfig().VndkUseCoreVariant() && ccDep.IsVndk() && !ccDep.MustUseVendorVariant() && !c.InRamdisk() && !c.InRecovery() {
+ if ctx.DeviceConfig().VndkUseCoreVariant() && ccDep.IsVndk() && !ccDep.MustUseVendorVariant() &&
+ !c.InRamdisk() && !c.InVendorRamdisk() && !c.InRecovery() {
// The vendor module is a no-vendor-variant VNDK library. Depend on the
// core module instead.
return libName
@@ -2654,6 +2687,8 @@
return libName + vendorPublicLibrarySuffix
} else if ccDep.InRamdisk() && !ccDep.OnlyInRamdisk() {
return libName + ramdiskSuffix
+ } else if ccDep.InVendorRamdisk() && !ccDep.OnlyInVendorRamdisk() {
+ return libName + vendorRamdiskSuffix
} else if ccDep.InRecovery() && !ccDep.OnlyInRecovery() {
return libName + recoverySuffix
} else if ccDep.Module().Target().NativeBridge == android.NativeBridgeEnabled {
@@ -2684,6 +2719,10 @@
return c.InRamdisk()
}
+func (c *Module) InstallInVendorRamdisk() bool {
+ return c.InVendorRamdisk()
+}
+
func (c *Module) InstallInRecovery() bool {
return c.InRecovery()
}
@@ -2784,6 +2823,8 @@
return "native:vendor"
} else if c.InRamdisk() {
return "native:ramdisk"
+ } else if c.InVendorRamdisk() {
+ return "native:vendor_ramdisk"
} else if c.InRecovery() {
return "native:recovery"
} else if c.Target().Os == android.Android && String(c.Properties.Sdk_version) != "" {
diff --git a/cc/cc_test.go b/cc/cc_test.go
index c3caac8..3982c0c 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -103,6 +103,7 @@
}
func testCcError(t *testing.T, pattern string, bp string) {
+ t.Helper()
config := TestConfig(buildDir, android.Android, nil, bp, nil)
config.TestProductVariables.DeviceVndkVersion = StringPtr("current")
config.TestProductVariables.Platform_vndk_version = StringPtr("VER")
@@ -111,6 +112,7 @@
}
func testCcErrorProductVndk(t *testing.T, pattern string, bp string) {
+ t.Helper()
config := TestConfig(buildDir, android.Android, nil, bp, nil)
config.TestProductVariables.DeviceVndkVersion = StringPtr("current")
config.TestProductVariables.ProductVndkVersion = StringPtr("current")
@@ -388,10 +390,12 @@
ctx := testCcWithConfig(t, config)
- checkVndkModule(t, ctx, "libvndk", "vndk-VER", false, "", vendorVariant)
- checkVndkModule(t, ctx, "libvndk_private", "vndk-VER", false, "", vendorVariant)
- checkVndkModule(t, ctx, "libvndk_sp", "vndk-sp-VER", true, "", vendorVariant)
- checkVndkModule(t, ctx, "libvndk_sp_private", "vndk-sp-VER", true, "", vendorVariant)
+ // subdir == "" because VNDK libs are not supposed to be installed separately.
+ // They are installed as part of VNDK APEX instead.
+ checkVndkModule(t, ctx, "libvndk", "", false, "", vendorVariant)
+ checkVndkModule(t, ctx, "libvndk_private", "", false, "", vendorVariant)
+ checkVndkModule(t, ctx, "libvndk_sp", "", true, "", vendorVariant)
+ checkVndkModule(t, ctx, "libvndk_sp_private", "", true, "", vendorVariant)
// Check VNDK snapshot output.
@@ -846,10 +850,11 @@
cc_library {
name: "libllndk",
shared_libs: ["libdoubleloadable"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -867,10 +872,11 @@
cc_library {
name: "libllndk",
shared_libs: ["libvndksp"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -924,10 +930,11 @@
cc_library {
name: "libllndk",
shared_libs: ["libcoreonly"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -1548,10 +1555,11 @@
cc_library {
name: "libllndk",
shared_libs: ["libnondoubleloadable"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -1570,10 +1578,11 @@
name: "libllndk",
no_libcrt: true,
shared_libs: ["libnondoubleloadable"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -1642,10 +1651,11 @@
cc_library {
name: "libllndk",
shared_libs: ["libcoreonly"],
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
@@ -1662,6 +1672,35 @@
`)
}
+func TestCheckVndkMembershipBeforeDoubleLoadable(t *testing.T) {
+ testCcError(t, "module \"libvndksp\" variant .*: .*: VNDK-SP must only depend on VNDK-SP", `
+ cc_library {
+ name: "libvndksp",
+ shared_libs: ["libanothervndksp"],
+ vendor_available: true,
+ vndk: {
+ enabled: true,
+ support_system_process: true,
+ }
+ }
+
+ cc_library {
+ name: "libllndk",
+ shared_libs: ["libanothervndksp"],
+ }
+
+ llndk_library {
+ name: "libllndk",
+ symbol_file: "",
+ }
+
+ cc_library {
+ name: "libanothervndksp",
+ vendor_available: true,
+ }
+ `)
+}
+
func TestVndkExt(t *testing.T) {
// This test checks the VNDK-Ext properties.
bp := `
@@ -2386,9 +2425,10 @@
bp := `
cc_library {
name: "libllndk",
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
cc_library {
@@ -2452,8 +2492,8 @@
ctx := testCcWithConfig(t, config)
- checkVndkModule(t, ctx, "libvndk", "vndk-VER", false, "", productVariant)
- checkVndkModule(t, ctx, "libvndk_sp", "vndk-sp-VER", true, "", productVariant)
+ checkVndkModule(t, ctx, "libvndk", "", false, "", productVariant)
+ checkVndkModule(t, ctx, "libvndk_sp", "", true, "", productVariant)
}
func TestEnforceProductVndkVersionErrors(t *testing.T) {
@@ -2589,16 +2629,18 @@
}
cc_library {
name: "libllndk",
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
symbol_file: "",
}
cc_library {
name: "libllndkprivate",
+ llndk_stubs: "libllndkprivate.llndk",
}
llndk_library {
- name: "libllndkprivate",
+ name: "libllndkprivate.llndk",
vendor_available: false,
symbol_file: "",
}`
@@ -3012,9 +3054,10 @@
cc_library {
name: "libllndk",
stubs: { versions: ["1", "2"] },
+ llndk_stubs: "libllndk.llndk",
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
}
`)
actual := ctx.ModuleVariantsForTests("libllndk.llndk")
@@ -3042,10 +3085,15 @@
export_include_dirs: ["my_include"],
}
llndk_library {
- name: "libllndk",
+ name: "libllndk.llndk",
export_llndk_headers: ["libllndk_headers"],
}
cc_library {
+ name: "libllndk",
+ llndk_stubs: "libllndk.llndk",
+ }
+
+ cc_library {
name: "libvendor",
shared_libs: ["libllndk"],
vendor: true,
diff --git a/cc/config/global.go b/cc/config/global.go
index 1aa2621..a170652 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -53,13 +53,6 @@
"-Werror=pragma-pack",
"-Werror=pragma-pack-suspicious-include",
"-Werror=unreachable-code-loop-increment",
-
- // -fdebug-compilation-dir=. is used to make both the action command line and the output
- // independent of the working directory of the action.
- // Using cc1 flags since RBE's input processor does not yet have the updated version
- // of LLVM that promotes the cc1 flag to driver level flag.
- // See: https://reviews.llvm.org/D63387
- "-Xclang,-fdebug-compilation-dir,.",
}
commonGlobalConlyflags = []string{}
@@ -157,6 +150,10 @@
var pctx = android.NewPackageContext("android/soong/cc/config")
func init() {
+ if android.BuildOs == android.Linux {
+ commonGlobalCflags = append(commonGlobalCflags, "-fdebug-prefix-map=/proc/self/cwd=")
+ }
+
pctx.StaticVariable("CommonGlobalConlyflags", strings.Join(commonGlobalConlyflags, " "))
pctx.StaticVariable("DeviceGlobalCppflags", strings.Join(deviceGlobalCppflags, " "))
pctx.StaticVariable("DeviceGlobalLdflags", strings.Join(deviceGlobalLdflags, " "))
diff --git a/cc/fuzz.go b/cc/fuzz.go
index e81b40f..681e3bc 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -388,10 +388,10 @@
return
}
- // Discard ramdisk + recovery modules, they're duplicates of
+ // Discard ramdisk + vendor_ramdisk + recovery modules, they're duplicates of
// fuzz targets we're going to package anyway.
if !ccModule.Enabled() || ccModule.Properties.PreventInstall ||
- ccModule.InRamdisk() || ccModule.InRecovery() {
+ ccModule.InRamdisk() || ccModule.InVendorRamdisk() || ccModule.InRecovery() {
return
}
diff --git a/cc/genrule.go b/cc/genrule.go
index cce4a83..a5a58d2 100644
--- a/cc/genrule.go
+++ b/cc/genrule.go
@@ -24,10 +24,11 @@
}
type GenruleExtraProperties struct {
- Vendor_available *bool
- Ramdisk_available *bool
- Recovery_available *bool
- Sdk_version *string
+ Vendor_available *bool
+ Ramdisk_available *bool
+ Vendor_ramdisk_available *bool
+ Recovery_available *bool
+ Sdk_version *string
}
// cc_genrule is a genrule that can depend on other cc_* objects.
@@ -68,6 +69,10 @@
return Bool(g.Ramdisk_available)
}
+func (g *GenruleExtraProperties) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
+ return Bool(g.Vendor_ramdisk_available)
+}
+
func (g *GenruleExtraProperties) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return Bool(g.Recovery_available)
}
diff --git a/cc/image.go b/cc/image.go
index 6710e94..ba091e1 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -27,12 +27,13 @@
type imageVariantType string
const (
- coreImageVariant imageVariantType = "core"
- vendorImageVariant imageVariantType = "vendor"
- productImageVariant imageVariantType = "product"
- ramdiskImageVariant imageVariantType = "ramdisk"
- recoveryImageVariant imageVariantType = "recovery"
- hostImageVariant imageVariantType = "host"
+ coreImageVariant imageVariantType = "core"
+ vendorImageVariant imageVariantType = "vendor"
+ productImageVariant imageVariantType = "product"
+ ramdiskImageVariant imageVariantType = "ramdisk"
+ vendorRamdiskImageVariant imageVariantType = "vendor_ramdisk"
+ recoveryImageVariant imageVariantType = "recovery"
+ hostImageVariant imageVariantType = "host"
)
func (c *Module) getImageVariantType() imageVariantType {
@@ -44,6 +45,8 @@
return productImageVariant
} else if c.InRamdisk() {
return ramdiskImageVariant
+ } else if c.InVendorRamdisk() {
+ return vendorRamdiskImageVariant
} else if c.InRecovery() {
return recoveryImageVariant
} else {
@@ -83,6 +86,10 @@
return ctx.mod.InRamdisk()
}
+func (ctx *moduleContextImpl) inVendorRamdisk() bool {
+ return ctx.mod.InVendorRamdisk()
+}
+
func (ctx *moduleContextImpl) inRecovery() bool {
return ctx.mod.InRecovery()
}
@@ -107,6 +114,10 @@
return c.ModuleBase.InRamdisk() || c.ModuleBase.InstallInRamdisk()
}
+func (c *Module) InVendorRamdisk() bool {
+ return c.ModuleBase.InVendorRamdisk() || c.ModuleBase.InstallInVendorRamdisk()
+}
+
func (c *Module) InRecovery() bool {
return c.ModuleBase.InRecovery() || c.ModuleBase.InstallInRecovery()
}
@@ -115,6 +126,10 @@
return c.ModuleBase.InstallInRamdisk()
}
+func (c *Module) OnlyInVendorRamdisk() bool {
+ return c.ModuleBase.InstallInVendorRamdisk()
+}
+
func (c *Module) OnlyInRecovery() bool {
return c.ModuleBase.InstallInRecovery()
}
@@ -165,6 +180,7 @@
var coreVariantNeeded bool = false
var ramdiskVariantNeeded bool = false
+ var vendorRamdiskVariantNeeded bool = false
var recoveryVariantNeeded bool = false
var vendorVariants []string
@@ -283,6 +299,15 @@
coreVariantNeeded = false
}
+ if Bool(m.Properties.Vendor_ramdisk_available) {
+ vendorRamdiskVariantNeeded = true
+ }
+
+ if m.ModuleBase.InstallInVendorRamdisk() {
+ vendorRamdiskVariantNeeded = true
+ coreVariantNeeded = false
+ }
+
if Bool(m.Properties.Recovery_available) {
recoveryVariantNeeded = true
}
@@ -301,6 +326,7 @@
}
m.Properties.RamdiskVariantNeeded = ramdiskVariantNeeded
+ m.Properties.VendorRamdiskVariantNeeded = vendorRamdiskVariantNeeded
m.Properties.RecoveryVariantNeeded = recoveryVariantNeeded
m.Properties.CoreVariantNeeded = coreVariantNeeded
}
@@ -313,6 +339,10 @@
return c.Properties.RamdiskVariantNeeded
}
+func (c *Module) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
+ return c.Properties.VendorRamdiskVariantNeeded
+}
+
func (c *Module) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return c.Properties.RecoveryVariantNeeded
}
@@ -323,7 +353,7 @@
func (c *Module) SetImageVariation(ctx android.BaseModuleContext, variant string, module android.Module) {
m := module.(*Module)
- if variant == android.RamdiskVariation {
+ if variant == android.RamdiskVariation || variant == android.VendorRamdiskVariation {
m.MakeAsPlatform()
} else if variant == android.RecoveryVariation {
m.MakeAsPlatform()
diff --git a/cc/library.go b/cc/library.go
index 090abf9..0e0f143 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -110,6 +110,9 @@
// Inject boringssl hash into the shared library. This is only intended for use by external/boringssl.
Inject_bssl_hash *bool `android:"arch_variant"`
+
+ // If this is an LLNDK library, the name of the equivalent llndk_library module.
+ Llndk_stubs *string
}
type StaticProperties struct {
@@ -695,6 +698,8 @@
stubsVersions(ctx android.BaseMutatorContext) []string
setAllStubsVersions([]string)
allStubsVersions() []string
+
+ implementationModuleName(name string) string
}
var _ libraryInterface = (*libraryDecorator)(nil)
@@ -1194,7 +1199,8 @@
isVendor := ctx.useVndk()
isOwnerPlatform := Bool(library.Properties.Sysprop.Platform)
- if !ctx.inRamdisk() && !ctx.inRecovery() && (isProduct || (isOwnerPlatform == isVendor)) {
+ if !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() &&
+ (isProduct || (isOwnerPlatform == isVendor)) {
dir = android.PathForModuleGen(ctx, "sysprop/public", "include")
}
}
@@ -1205,7 +1211,7 @@
}
if library.buildStubs() && !library.skipAPIDefine {
- library.reexportFlags("-D" + versioningMacroName(ctx.baseModuleName()) + "=" + library.stubsVersion())
+ library.reexportFlags("-D" + versioningMacroName(ctx.Module().(*Module).ImplementationModuleName(ctx)) + "=" + library.stubsVersion())
}
library.flagExporter.setProvider(ctx)
@@ -1246,19 +1252,23 @@
func (library *libraryDecorator) install(ctx ModuleContext, file android.Path) {
if library.shared() {
if ctx.Device() && ctx.useVndk() {
- if ctx.isVndkSp() {
- library.baseInstaller.subDir = "vndk-sp"
- } else if ctx.isVndk() {
+ // set subDir for VNDK extensions
+ if ctx.isVndkExt() {
+ if ctx.isVndkSp() {
+ library.baseInstaller.subDir = "vndk-sp"
+ } else {
+ library.baseInstaller.subDir = "vndk"
+ }
+ }
+
+ // In some cases we want to use core variant for VNDK-Core libs
+ if ctx.isVndk() && !ctx.isVndkSp() && !ctx.isVndkExt() {
mayUseCoreVariant := true
if ctx.mustUseVendorVariant() {
mayUseCoreVariant = false
}
- if ctx.isVndkExt() {
- mayUseCoreVariant = false
- }
-
if ctx.Config().CFIEnabledForPath(ctx.ModuleDir()) && ctx.Arch().ArchType == android.Arm64 {
mayUseCoreVariant = false
}
@@ -1269,15 +1279,12 @@
library.useCoreVariant = true
}
}
- library.baseInstaller.subDir = "vndk"
}
- // Append a version to vndk or vndk-sp directories on the system partition.
+ // do not install vndk libs
+ // vndk libs are packaged into VNDK APEX
if ctx.isVndk() && !ctx.isVndkExt() {
- vndkVersion := ctx.DeviceConfig().PlatformVndkVersion()
- if vndkVersion != "current" && vndkVersion != "" {
- library.baseInstaller.subDir += "-" + vndkVersion
- }
+ return
}
} else if len(library.Properties.Stubs.Versions) > 0 && !ctx.Host() && ctx.directlyInAnyApex() {
// Bionic libraries (e.g. libc.so) is installed to the bootstrap subdirectory.
@@ -1285,7 +1292,7 @@
// runtime APEX.
translatedArch := ctx.Target().NativeBridge == android.NativeBridgeEnabled
if InstallToBootstrap(ctx.baseModuleName(), ctx.Config()) && !library.buildStubs() &&
- !translatedArch && !ctx.inRamdisk() && !ctx.inRecovery() {
+ !translatedArch && !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() {
if ctx.Device() {
library.installSymlinkToRuntimeApex(ctx, file)
}
@@ -1300,7 +1307,7 @@
}
if Bool(library.Properties.Static_ndk_lib) && library.static() &&
- !ctx.useVndk() && !ctx.inRamdisk() && !ctx.inRecovery() && ctx.Device() &&
+ !ctx.useVndk() && !ctx.inRamdisk() && !ctx.inVendorRamdisk() && !ctx.inRecovery() && ctx.Device() &&
library.baseLinker.sanitize.isUnsanitizedVariant() &&
!library.buildStubs() && ctx.sdkVersion() == "" {
installPath := getNdkSysrootBase(ctx).Join(
@@ -1358,6 +1365,10 @@
library.MutatedProperties.BuildStatic = false
}
+func (library *libraryDecorator) implementationModuleName(name string) string {
+ return name
+}
+
func (library *libraryDecorator) buildStubs() bool {
return library.MutatedProperties.BuildStubs
}
@@ -1634,14 +1645,16 @@
func CanBeOrLinkAgainstVersionVariants(module interface {
Host() bool
InRamdisk() bool
+ InVendorRamdisk() bool
InRecovery() bool
}) bool {
- return !module.Host() && !module.InRamdisk() && !module.InRecovery()
+ return !module.Host() && !module.InRamdisk() && !module.InVendorRamdisk() && !module.InRecovery()
}
func CanBeVersionVariant(module interface {
Host() bool
InRamdisk() bool
+ InVendorRamdisk() bool
InRecovery() bool
CcLibraryInterface() bool
Shared() bool
diff --git a/cc/linkable.go b/cc/linkable.go
index 4eb7220..177e0c4 100644
--- a/cc/linkable.go
+++ b/cc/linkable.go
@@ -40,6 +40,9 @@
InRamdisk() bool
OnlyInRamdisk() bool
+ InVendorRamdisk() bool
+ OnlyInVendorRamdisk() bool
+
InRecovery() bool
OnlyInRecovery() bool
diff --git a/cc/llndk_library.go b/cc/llndk_library.go
index 4425a10..9f4444d 100644
--- a/cc/llndk_library.go
+++ b/cc/llndk_library.go
@@ -72,6 +72,8 @@
movedToApex bool
}
+var _ versionedInterface = (*llndkStubDecorator)(nil)
+
func (stub *llndkStubDecorator) compilerFlags(ctx ModuleContext, flags Flags, deps PathDeps) Flags {
flags = stub.baseCompiler.compilerFlags(ctx, flags, deps)
return addStubLibraryCompilerFlags(flags)
@@ -101,12 +103,14 @@
}
func (stub *llndkStubDecorator) Name(name string) string {
+ if strings.HasSuffix(name, llndkLibrarySuffix) {
+ return name
+ }
return name + llndkLibrarySuffix
}
func (stub *llndkStubDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
- stub.libraryDecorator.libName = strings.TrimSuffix(ctx.ModuleName(),
- llndkLibrarySuffix)
+ stub.libraryDecorator.libName = stub.implementationModuleName(ctx.ModuleName())
return stub.libraryDecorator.linkerFlags(ctx, flags)
}
@@ -133,7 +137,7 @@
func (stub *llndkStubDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps,
objs Objects) android.Path {
- impl := ctx.GetDirectDepWithTag(ctx.baseModuleName(), llndkImplDep)
+ impl := ctx.GetDirectDepWithTag(stub.implementationModuleName(ctx.ModuleName()), llndkImplDep)
if implApexModule, ok := impl.(android.ApexModule); ok {
stub.movedToApex = implApexModule.DirectlyInAnyApex()
}
@@ -167,6 +171,10 @@
return false
}
+func (stub *llndkStubDecorator) implementationModuleName(name string) string {
+ return strings.TrimSuffix(name, llndkLibrarySuffix)
+}
+
func (stub *llndkStubDecorator) buildStubs() bool {
return true
}
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index f2ad652..02b38a6 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -100,10 +100,16 @@
unversionedUntil android.ApiLevel
}
+var _ versionedInterface = (*stubDecorator)(nil)
+
func shouldUseVersionScript(ctx BaseModuleContext, stub *stubDecorator) bool {
return stub.apiLevel.GreaterThanOrEqualTo(stub.unversionedUntil)
}
+func (stub *stubDecorator) implementationModuleName(name string) string {
+ return strings.TrimSuffix(name, ndkLibrarySuffix)
+}
+
func ndkLibraryVersions(ctx android.BaseMutatorContext, from android.ApiLevel) []string {
var versions []android.ApiLevel
versionStrs := []string{}
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 43198c1..b1326d9 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -376,8 +376,8 @@
}
// HWASan ramdisk (which is built from recovery) goes over some bootloader limit.
- // Keep libc instrumented so that ramdisk / recovery can run hwasan-instrumented code if necessary.
- if (ctx.inRamdisk() || ctx.inRecovery()) && !strings.HasPrefix(ctx.ModuleDir(), "bionic/libc") {
+ // Keep libc instrumented so that ramdisk / vendor_ramdisk / recovery can run hwasan-instrumented code if necessary.
+ if (ctx.inRamdisk() || ctx.inVendorRamdisk() || ctx.inRecovery()) && !strings.HasPrefix(ctx.ModuleDir(), "bionic/libc") {
s.Hwaddress = nil
}
diff --git a/cc/testing.go b/cc/testing.go
index 52f0829..019a186 100644
--- a/cc/testing.go
+++ b/cc/testing.go
@@ -172,9 +172,10 @@
stubs: {
versions: ["27", "28", "29"],
},
- }
+ llndk_stubs: "libc.llndk",
+}
llndk_library {
- name: "libc",
+ name: "libc.llndk",
symbol_file: "",
sdk_version: "current",
}
@@ -193,9 +194,10 @@
"//apex_available:platform",
"myapex"
],
+ llndk_stubs: "libm.llndk",
}
llndk_library {
- name: "libm",
+ name: "libm.llndk",
symbol_file: "",
sdk_version: "current",
}
@@ -253,9 +255,10 @@
"//apex_available:platform",
"myapex"
],
+ llndk_stubs: "libdl.llndk",
}
llndk_library {
- name: "libdl",
+ name: "libdl.llndk",
symbol_file: "",
sdk_version: "current",
}
@@ -265,9 +268,10 @@
nocrt: true,
system_shared_libs: [],
recovery_available: true,
+ llndk_stubs: "libft2.llndk",
}
llndk_library {
- name: "libft2",
+ name: "libft2.llndk",
symbol_file: "",
vendor_available: false,
sdk_version: "current",
diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go
index 64e3ea8..78bde38 100644
--- a/cc/vendor_snapshot.go
+++ b/cc/vendor_snapshot.go
@@ -1005,9 +1005,10 @@
// But we can't just check SocSpecific() since we already passed the image mutator.
// Check ramdisk and recovery to see if we are real "vendor: true" module.
ramdisk_available := module.InRamdisk() && !module.OnlyInRamdisk()
+ vendor_ramdisk_available := module.InVendorRamdisk() && !module.OnlyInVendorRamdisk()
recovery_available := module.InRecovery() && !module.OnlyInRecovery()
- if !ramdisk_available && !recovery_available {
+ if !ramdisk_available && !recovery_available && !vendor_ramdisk_available {
vendorSnapshotsLock.Lock()
defer vendorSnapshotsLock.Unlock()
diff --git a/cc/vndk.go b/cc/vndk.go
index 981e039..6d5b074 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -129,7 +129,7 @@
return "native:vendor:vndkspext"
}
-func (vndk *vndkdep) vndkCheckLinkType(ctx android.ModuleContext, to *Module, tag blueprint.DependencyTag) {
+func (vndk *vndkdep) vndkCheckLinkType(ctx android.BaseModuleContext, to *Module, tag blueprint.DependencyTag) {
if to.linker == nil {
return
}
@@ -247,7 +247,7 @@
}
func isLlndkLibrary(baseModuleName string, config android.Config) bool {
- _, ok := llndkLibraries(config)[baseModuleName]
+ _, ok := llndkLibraries(config)[strings.TrimSuffix(baseModuleName, llndkLibrarySuffix)]
return ok
}
@@ -290,8 +290,8 @@
func processLlndkLibrary(mctx android.BottomUpMutatorContext, m *Module) {
lib := m.linker.(*llndkStubDecorator)
- name := m.BaseModuleName()
- filename := m.BaseModuleName() + ".so"
+ name := m.ImplementationModuleName(mctx)
+ filename := name + ".so"
vndkLibrariesLock.Lock()
defer vndkLibrariesLock.Unlock()
@@ -540,6 +540,9 @@
if m.Target().NativeBridge == android.NativeBridgeEnabled {
return nil, "", false
}
+ // !inVendor: There's product/vendor variants for VNDK libs. We only care about vendor variants.
+ // !installable: Snapshot only cares about "installable" modules.
+ // isSnapshotPrebuilt: Snapshotting a snapshot doesn't make sense.
if !m.inVendor() || !m.installable(apexInfo) || m.isSnapshotPrebuilt() {
return nil, "", false
}
@@ -834,8 +837,8 @@
if m, ok := module.(*Module); ok {
if llndk, ok := m.linker.(*llndkStubDecorator); ok {
// Skip bionic libs, they are handled in different manner
- name := m.BaseModuleName()
- if llndk.movedToApex && !isBionic(m.BaseModuleName()) {
+ name := llndk.implementationModuleName(m.BaseModuleName())
+ if llndk.movedToApex && !isBionic(name) {
movedToApexLlndkLibraries[name] = true
}
}
diff --git a/cc/vndk_prebuilt.go b/cc/vndk_prebuilt.go
index 3556d94..82a7732 100644
--- a/cc/vndk_prebuilt.go
+++ b/cc/vndk_prebuilt.go
@@ -201,21 +201,7 @@
}
func (p *vndkPrebuiltLibraryDecorator) install(ctx ModuleContext, file android.Path) {
- arches := ctx.DeviceConfig().Arches()
- if len(arches) == 0 || arches[0].ArchType.String() != p.arch() {
- return
- }
- if ctx.DeviceConfig().BinderBitness() != p.binderBit() {
- return
- }
- if p.shared() {
- if ctx.isVndkSp() {
- p.baseInstaller.subDir = "vndk-sp-" + p.version()
- } else if ctx.isVndk() {
- p.baseInstaller.subDir = "vndk-" + p.version()
- }
- p.baseInstaller.install(ctx, file)
- }
+ // do not install vndk libs
}
func vndkPrebuiltSharedLibrary() *Module {
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index 664cb51..337ad88 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -61,6 +61,9 @@
// Make this module available when building for ramdisk.
Ramdisk_available *bool
+ // Make this module available when building for vendor ramdisk.
+ Vendor_ramdisk_available *bool
+
// Make this module available when building for recovery.
Recovery_available *bool
@@ -105,6 +108,18 @@
return p.inRamdisk()
}
+func (p *PrebuiltEtc) inVendorRamdisk() bool {
+ return p.ModuleBase.InVendorRamdisk() || p.ModuleBase.InstallInVendorRamdisk()
+}
+
+func (p *PrebuiltEtc) onlyInVendorRamdisk() bool {
+ return p.ModuleBase.InstallInVendorRamdisk()
+}
+
+func (p *PrebuiltEtc) InstallInVendorRamdisk() bool {
+ return p.inVendorRamdisk()
+}
+
func (p *PrebuiltEtc) inRecovery() bool {
return p.ModuleBase.InRecovery() || p.ModuleBase.InstallInRecovery()
}
@@ -122,13 +137,18 @@
func (p *PrebuiltEtc) ImageMutatorBegin(ctx android.BaseModuleContext) {}
func (p *PrebuiltEtc) CoreVariantNeeded(ctx android.BaseModuleContext) bool {
- return !p.ModuleBase.InstallInRecovery() && !p.ModuleBase.InstallInRamdisk()
+ return !p.ModuleBase.InstallInRecovery() && !p.ModuleBase.InstallInRamdisk() &&
+ !p.ModuleBase.InstallInVendorRamdisk()
}
func (p *PrebuiltEtc) RamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
return proptools.Bool(p.properties.Ramdisk_available) || p.ModuleBase.InstallInRamdisk()
}
+func (p *PrebuiltEtc) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
+ return proptools.Bool(p.properties.Vendor_ramdisk_available) || p.ModuleBase.InstallInVendorRamdisk()
+}
+
func (p *PrebuiltEtc) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return proptools.Bool(p.properties.Recovery_available) || p.ModuleBase.InstallInRecovery()
}
@@ -228,6 +248,9 @@
if p.inRamdisk() && !p.onlyInRamdisk() {
nameSuffix = ".ramdisk"
}
+ if p.inVendorRamdisk() && !p.onlyInVendorRamdisk() {
+ nameSuffix = ".vendor_ramdisk"
+ }
if p.inRecovery() && !p.onlyInRecovery() {
nameSuffix = ".recovery"
}
diff --git a/genrule/genrule.go b/genrule/genrule.go
index 99d6207..b09c195 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -605,6 +605,7 @@
func (x noopImageInterface) ImageMutatorBegin(android.BaseModuleContext) {}
func (x noopImageInterface) CoreVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) RamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
+func (x noopImageInterface) VendorRamdiskVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) RecoveryVariantNeeded(android.BaseModuleContext) bool { return false }
func (x noopImageInterface) ExtraImageVariations(ctx android.BaseModuleContext) []string { return nil }
func (x noopImageInterface) SetImageVariation(ctx android.BaseModuleContext, variation string, module android.Module) {
diff --git a/java/aar.go b/java/aar.go
index f1f6848..157d677 100644
--- a/java/aar.go
+++ b/java/aar.go
@@ -536,6 +536,8 @@
ctx.CheckbuildFile(a.aarFile)
}
+ a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles,
+ android.PathsForModuleSrc(ctx, a.dexProperties.Optimize.Proguard_flags_files)...)
ctx.VisitDirectDeps(func(m android.Module) {
if lib, ok := m.(AndroidLibraryDependency); ok && ctx.OtherModuleDependencyTag(m) == staticLibTag {
a.exportedProguardFlagFiles = append(a.exportedProguardFlagFiles, lib.ExportedProguardFlagFiles()...)
diff --git a/java/app_test.go b/java/app_test.go
index 49ed3aa..cec8a62 100644
--- a/java/app_test.go
+++ b/java/app_test.go
@@ -3491,3 +3491,34 @@
})
}
}
+
+func TestExportedProguardFlagFiles(t *testing.T) {
+ ctx, _ := testJava(t, `
+ android_app {
+ name: "foo",
+ sdk_version: "current",
+ static_libs: ["lib1"],
+ }
+
+ android_library {
+ name: "lib1",
+ sdk_version: "current",
+ optimize: {
+ proguard_flags_files: ["lib1proguard.cfg"],
+ }
+ }
+ `)
+
+ m := ctx.ModuleForTests("foo", "android_common")
+ hasLib1Proguard := false
+ for _, s := range m.Rule("java.r8").Implicits.Strings() {
+ if s == "lib1proguard.cfg" {
+ hasLib1Proguard = true
+ break
+ }
+ }
+
+ if !hasLib1Proguard {
+ t.Errorf("App does not use library proguard config")
+ }
+}
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 9f49786..629d34f 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -270,7 +270,7 @@
apexInfo := ctx.ModuleProvider(module, android.ApexInfoProvider).(android.ApexInfo)
fromUpdatableApex := isApexModule && apexInfo.Updatable
if image.name == artBootImageName {
- if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.InApexes, "com.android.art.") {
+ if isApexModule && len(apexInfo.InApexes) > 0 && allHavePrefix(apexInfo.InApexes, "com.android.art") {
// ok: found the jar in the ART apex
} else if isApexModule && apexInfo.IsForPlatform() && isHostdex(module) {
// exception (skip and continue): special "hostdex" platform variant
@@ -301,7 +301,7 @@
func allHavePrefix(list []string, prefix string) bool {
for _, s := range list {
- if !strings.HasPrefix(s, prefix) {
+ if s != prefix && !strings.HasPrefix(s, prefix+".") {
return false
}
}
diff --git a/rust/bindgen.go b/rust/bindgen.go
index 68f219e..3db2d65 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -150,6 +150,18 @@
esc := proptools.NinjaAndShellEscapeList
+ // Filter out invalid cflags
+ for _, flag := range b.ClangProperties.Cflags {
+ if flag == "-x c++" || flag == "-xc++" {
+ ctx.PropertyErrorf("cflags",
+ "-x c++ should not be specified in cflags; setting cpp_std specifies this is a C++ header, or change the file extension to '.hpp' or '.hh'")
+ }
+ if strings.HasPrefix(flag, "-std=") {
+ ctx.PropertyErrorf("cflags",
+ "-std should not be specified in cflags; instead use c_std or cpp_std")
+ }
+ }
+
// Module defined clang flags and include paths
cflags = append(cflags, esc(b.ClangProperties.Cflags)...)
for _, include := range b.ClangProperties.Local_include_dirs {
diff --git a/rust/bindgen_test.go b/rust/bindgen_test.go
index 9cccf13..c7ce42b 100644
--- a/rust/bindgen_test.go
+++ b/rust/bindgen_test.go
@@ -134,3 +134,29 @@
t.Errorf("cpp_std value not passed in to rust_bindgen as a clang flag")
}
}
+
+func TestBindgenDisallowedFlags(t *testing.T) {
+ // Make sure passing '-x c++' to cflags generates an error
+ testRustError(t, "cflags: -x c\\+\\+ should not be specified in cflags.*", `
+ rust_bindgen {
+ name: "libbad_flag",
+ wrapper_src: "src/any.h",
+ crate_name: "bindgen",
+ stem: "libbindgen",
+ source_stem: "bindings",
+ cflags: ["-x c++"]
+ }
+ `)
+
+ // Make sure passing '-std=' to cflags generates an error
+ testRustError(t, "cflags: -std should not be specified in cflags.*", `
+ rust_bindgen {
+ name: "libbad_flag",
+ wrapper_src: "src/any.h",
+ crate_name: "bindgen",
+ stem: "libbindgen",
+ source_stem: "bindings",
+ cflags: ["-std=foo"]
+ }
+ `)
+}
diff --git a/rust/config/allowed_list.go b/rust/config/allowed_list.go
index b9a879a..b5c70dc 100644
--- a/rust/config/allowed_list.go
+++ b/rust/config/allowed_list.go
@@ -6,10 +6,11 @@
// for an example.
// TODO(b/160223496): enable rustfmt globally.
RustAllowedPaths = []string{
+ "external/adhd",
+ "external/crosvm",
"external/minijail",
"external/rust",
- "external/crosvm",
- "external/adhd",
+ "external/vm_tools/p9",
"frameworks/native/libs/binder/rust",
"packages/modules/Virtualization",
"prebuilts/rust",
diff --git a/rust/rust.go b/rust/rust.go
index 1b999d7..77d9a90 100644
--- a/rust/rust.go
+++ b/rust/rust.go
@@ -118,6 +118,10 @@
return mod.InRamdisk()
}
+func (mod *Module) VendorRamdiskVariantNeeded(android.BaseModuleContext) bool {
+ return mod.InVendorRamdisk()
+}
+
func (mod *Module) RecoveryVariantNeeded(android.BaseModuleContext) bool {
return mod.InRecovery()
}
@@ -185,6 +189,10 @@
return false
}
+func (mod *Module) OnlyInVendorRamdisk() bool {
+ return false
+}
+
func (mod *Module) OnlyInRecovery() bool {
return false
}
diff --git a/scripts/build-mainline-modules.sh b/scripts/build-mainline-modules.sh
index c5ec8d1..b8dd7aa 100755
--- a/scripts/build-mainline-modules.sh
+++ b/scripts/build-mainline-modules.sh
@@ -3,13 +3,13 @@
# Non exhaustive list of modules where we want prebuilts. More can be added as
# needed.
MAINLINE_MODULES=(
+ com.android.art
com.android.art.debug
- com.android.art.release
com.android.art.testing
com.android.conscrypt
+ com.android.i18n
com.android.runtime
com.android.tzdata
- com.android.i18n
)
# List of SDKs and module exports we know of.
diff --git a/sdk/cc_sdk_test.go b/sdk/cc_sdk_test.go
index c214e75..c1813ec 100644
--- a/sdk/cc_sdk_test.go
+++ b/sdk/cc_sdk_test.go
@@ -120,10 +120,8 @@
android_arm64: {
srcs: ["android/arm64/lib/sdkmember.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/sdkmember.so"],
},
},
@@ -143,10 +141,8 @@
android_arm64: {
srcs: ["android/arm64/lib/sdkmember.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/sdkmember.so"],
},
},
@@ -162,7 +158,7 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
enabled: true,
},
},
@@ -670,20 +666,21 @@
enabled: false,
},
linux_glibc: {
- enabled: true,
compile_multilib: "both",
},
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/bin/mynativebinary"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/bin/mynativebinary"],
},
windows: {
- enabled: true,
compile_multilib: "64",
},
windows_x86_64: {
+ enabled: true,
srcs: ["windows/x86_64/bin/mynativebinary.exe"],
},
},
@@ -701,20 +698,21 @@
enabled: false,
},
linux_glibc: {
- enabled: true,
compile_multilib: "both",
},
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/bin/mynativebinary"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/bin/mynativebinary"],
},
windows: {
- enabled: true,
compile_multilib: "64",
},
windows_x86_64: {
+ enabled: true,
srcs: ["windows/x86_64/bin/mynativebinary.exe"],
},
},
@@ -727,15 +725,20 @@
host_supported: true,
native_binaries: ["myexports_mynativebinary@current"],
target: {
+ windows: {
+ compile_multilib: "64",
+ },
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
enabled: true,
},
- windows: {
+ linux_glibc_x86: {
enabled: true,
- compile_multilib: "64",
+ },
+ windows_x86_64: {
+ enabled: true,
},
},
}
@@ -811,10 +814,8 @@
host: {
enabled: false,
},
- linux_bionic: {
- enabled: true,
- },
linux_bionic_x86_64: {
+ enabled: true,
srcs: ["x86_64/bin/mynativebinary"],
},
},
@@ -832,10 +833,8 @@
host: {
enabled: false,
},
- linux_bionic: {
- enabled: true,
- },
linux_bionic_x86_64: {
+ enabled: true,
srcs: ["x86_64/bin/mynativebinary"],
},
},
@@ -854,10 +853,8 @@
host: {
enabled: false,
},
- linux_bionic: {
- enabled: true,
- },
linux_bionic_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.so"],
},
},
@@ -875,10 +872,8 @@
host: {
enabled: false,
},
- linux_bionic: {
- enabled: true,
- },
linux_bionic_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.so"],
},
},
@@ -896,7 +891,7 @@
host: {
enabled: false,
},
- linux_bionic: {
+ linux_bionic_x86_64: {
enabled: true,
},
},
@@ -952,13 +947,12 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/bin/linker"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/bin/linker"],
},
},
@@ -978,13 +972,12 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/bin/linker"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/bin/linker"],
},
},
@@ -1000,7 +993,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -1345,14 +1341,13 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.so"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/lib/mynativelib.so"],
export_include_dirs: ["x86/include_gen/mynativelib"],
},
@@ -1373,14 +1368,13 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.so"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/lib/mynativelib.so"],
export_include_dirs: ["x86/include_gen/mynativelib"],
},
@@ -1397,7 +1391,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -1464,20 +1461,21 @@
enabled: false,
},
linux_glibc: {
- enabled: true,
compile_multilib: "both",
},
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/mynativelib.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/mynativelib.so"],
},
windows: {
- enabled: true,
compile_multilib: "64",
},
windows_x86_64: {
+ enabled: true,
srcs: ["windows/x86_64/lib/mynativelib.dll"],
},
},
@@ -1495,20 +1493,21 @@
enabled: false,
},
linux_glibc: {
- enabled: true,
compile_multilib: "both",
},
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/mynativelib.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/mynativelib.so"],
},
windows: {
- enabled: true,
compile_multilib: "64",
},
windows_x86_64: {
+ enabled: true,
srcs: ["windows/x86_64/lib/mynativelib.dll"],
},
},
@@ -1521,15 +1520,20 @@
host_supported: true,
native_shared_libs: ["mysdk_mynativelib@current"],
target: {
+ windows: {
+ compile_multilib: "64",
+ },
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
enabled: true,
},
- windows: {
+ linux_glibc_x86: {
enabled: true,
- compile_multilib: "64",
+ },
+ windows_x86_64: {
+ enabled: true,
},
},
}
@@ -1669,14 +1673,13 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.a"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/lib/mynativelib.a"],
export_include_dirs: ["x86/include_gen/mynativelib"],
},
@@ -1696,14 +1699,13 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.a"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["x86/lib/mynativelib.a"],
export_include_dirs: ["x86/include_gen/mynativelib"],
},
@@ -1720,7 +1722,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -1885,10 +1890,8 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.a"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
@@ -1908,10 +1911,8 @@
host: {
enabled: false,
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["x86_64/lib/mynativelib.a"],
export_include_dirs: ["x86_64/include_gen/mynativelib"],
},
@@ -1929,7 +1930,7 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
enabled: true,
},
},
@@ -2027,7 +2028,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2046,7 +2050,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2062,7 +2069,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2118,9 +2128,14 @@
export_include_dirs: ["android/include/include-android"],
},
linux_glibc: {
- enabled: true,
export_include_dirs: ["linux_glibc/include/include-host"],
},
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
+ enabled: true,
+ },
},
}
@@ -2140,9 +2155,14 @@
export_include_dirs: ["android/include/include-android"],
},
linux_glibc: {
- enabled: true,
export_include_dirs: ["linux_glibc/include/include-host"],
},
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
+ enabled: true,
+ },
},
}
@@ -2155,7 +2175,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2346,13 +2369,12 @@
android_arm: {
srcs: ["android/arm/lib/sslvariants.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/sslvariants.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/sslvariants.so"],
},
},
@@ -2377,13 +2399,12 @@
android_arm: {
srcs: ["android/arm/lib/sslvariants.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/sslvariants.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/sslvariants.so"],
},
},
@@ -2398,7 +2419,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2536,13 +2560,12 @@
android_arm: {
srcs: ["android/arm/lib/stubslib.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/stubslib.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/stubslib.so"],
},
},
@@ -2571,13 +2594,12 @@
android_arm: {
srcs: ["android/arm/lib/stubslib.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/stubslib.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/stubslib.so"],
},
},
@@ -2592,7 +2614,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
@@ -2637,13 +2662,12 @@
android_arm: {
srcs: ["android/arm/lib/mylib.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/mylib-host.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/mylib-host.so"],
},
},
@@ -2666,13 +2690,12 @@
android_arm: {
srcs: ["android/arm/lib/mylib.so"],
},
- linux_glibc: {
- enabled: true,
- },
linux_glibc_x86_64: {
+ enabled: true,
srcs: ["linux_glibc/x86_64/lib/mylib-host.so"],
},
linux_glibc_x86: {
+ enabled: true,
srcs: ["linux_glibc/x86/lib/mylib-host.so"],
},
},
@@ -2687,7 +2710,10 @@
host: {
enabled: false,
},
- linux_glibc: {
+ linux_glibc_x86_64: {
+ enabled: true,
+ },
+ linux_glibc_x86: {
enabled: true,
},
},
diff --git a/sdk/update.go b/sdk/update.go
index f29b5a0..7bf5dea 100644
--- a/sdk/update.go
+++ b/sdk/update.go
@@ -347,34 +347,11 @@
targetPropertySet := snapshotModule.AddPropertySet("target")
- // If host is supported and any member is host OS dependent then disable host
- // by default, so that we can enable each host OS variant explicitly. This
- // avoids problems with implicitly enabled OS variants when the snapshot is
- // used, which might be different from this run (e.g. different build OS).
- hasHostOsDependentMember := false
- if s.HostSupported() {
- for _, memberRef := range memberRefs {
- if memberRef.memberType.IsHostOsDependent() {
- hasHostOsDependentMember = true
- break
- }
- }
- if hasHostOsDependentMember {
- hostPropertySet := targetPropertySet.AddPropertySet("host")
- hostPropertySet.AddProperty("enabled", false)
- }
- }
-
// Iterate over the os types in a fixed order.
for _, osType := range s.getPossibleOsTypes() {
if sdkVariant, ok := osTypeToMemberProperties[osType]; ok {
osPropertySet := targetPropertySet.AddPropertySet(sdkVariant.Target().Os.Name)
- // Enable the variant explicitly when we've disabled it by default on host.
- if hasHostOsDependentMember && osType.Class == android.Host {
- osPropertySet.AddProperty("enabled", true)
- }
-
variantProps := variantToProperties[sdkVariant]
if variantProps.Compile_multilib != "" && variantProps.Compile_multilib != "both" {
osPropertySet.AddProperty("compile_multilib", variantProps.Compile_multilib)
@@ -384,6 +361,31 @@
}
}
+ // If host is supported and any member is host OS dependent then disable host
+ // by default, so that we can enable each host OS variant explicitly. This
+ // avoids problems with implicitly enabled OS variants when the snapshot is
+ // used, which might be different from this run (e.g. different build OS).
+ if s.HostSupported() {
+ var supportedHostTargets []string
+ for _, memberRef := range memberRefs {
+ if memberRef.memberType.IsHostOsDependent() && memberRef.variant.Target().Os.Class == android.Host {
+ targetString := memberRef.variant.Target().Os.String() + "_" + memberRef.variant.Target().Arch.ArchType.String()
+ if !android.InList(targetString, supportedHostTargets) {
+ supportedHostTargets = append(supportedHostTargets, targetString)
+ }
+ }
+ }
+ if len(supportedHostTargets) > 0 {
+ hostPropertySet := targetPropertySet.AddPropertySet("host")
+ hostPropertySet.AddProperty("enabled", false)
+ }
+ // Enable the <os>_<arch> variant explicitly when we've disabled it by default on host.
+ for _, hostTarget := range supportedHostTargets {
+ propertySet := targetPropertySet.AddPropertySet(hostTarget)
+ propertySet.AddProperty("enabled", true)
+ }
+ }
+
// Prune any empty property sets.
snapshotModule.transform(pruneEmptySetTransformer{})
@@ -984,7 +986,7 @@
archTypeName := archType.Name
archVariants := variantsByArchName[archTypeName]
- archInfo := newArchSpecificInfo(ctx, archType, osSpecificVariantPropertiesFactory, archVariants)
+ archInfo := newArchSpecificInfo(ctx, archType, osType, osSpecificVariantPropertiesFactory, archVariants)
osInfo.archInfos = append(osInfo.archInfos, archInfo)
}
@@ -1067,11 +1069,6 @@
osPropertySet = targetPropertySet.AddPropertySet(osType.Name)
archPropertySet = targetPropertySet
- // Enable the variant explicitly when we've disabled it by default on host.
- if ctx.memberType.IsHostOsDependent() && osType.Class == android.Host {
- osPropertySet.AddProperty("enabled", true)
- }
-
// Arch specific properties need to be added to an os and arch specific
// section prefixed with <os>_.
archOsPrefix = osType.Name + "_"
@@ -1105,6 +1102,7 @@
baseInfo
archType android.ArchType
+ osType android.OsType
linkInfos []*linkTypeSpecificInfo
}
@@ -1113,10 +1111,10 @@
// Create a new archTypeSpecificInfo for the specified arch type and its properties
// structures populated with information from the variants.
-func newArchSpecificInfo(ctx android.SdkMemberContext, archType android.ArchType, variantPropertiesFactory variantPropertiesFactoryFunc, archVariants []android.Module) *archTypeSpecificInfo {
+func newArchSpecificInfo(ctx android.SdkMemberContext, archType android.ArchType, osType android.OsType, variantPropertiesFactory variantPropertiesFactoryFunc, archVariants []android.Module) *archTypeSpecificInfo {
// Create an arch specific info into which the variant properties can be copied.
- archInfo := &archTypeSpecificInfo{archType: archType}
+ archInfo := &archTypeSpecificInfo{archType: archType, osType: osType}
// Create the properties into which the arch type specific properties will be
// added.
@@ -1180,6 +1178,10 @@
func (archInfo *archTypeSpecificInfo) addToPropertySet(ctx *memberContext, archPropertySet android.BpPropertySet, archOsPrefix string) {
archTypeName := archInfo.archType.Name
archTypePropertySet := archPropertySet.AddPropertySet(archOsPrefix + archTypeName)
+ // Enable the <os>_<arch> variant explicitly when we've disabled it by default on host.
+ if ctx.memberType.IsHostOsDependent() && archInfo.osType.Class == android.Host {
+ archTypePropertySet.AddProperty("enabled", true)
+ }
addSdkMemberPropertiesToSet(ctx, archInfo.Properties, archTypePropertySet)
for _, linkInfo := range archInfo.linkInfos {
diff --git a/sh/sh_binary.go b/sh/sh_binary.go
index e807877..6f40ae4 100644
--- a/sh/sh_binary.go
+++ b/sh/sh_binary.go
@@ -68,6 +68,9 @@
// Make this module available when building for ramdisk.
Ramdisk_available *bool
+ // Make this module available when building for vendor ramdisk.
+ Vendor_ramdisk_available *bool
+
// Make this module available when building for recovery.
Recovery_available *bool
}
@@ -176,6 +179,10 @@
return proptools.Bool(s.properties.Ramdisk_available) || s.ModuleBase.InstallInRamdisk()
}
+func (s *ShBinary) VendorRamdiskVariantNeeded(ctx android.BaseModuleContext) bool {
+ return proptools.Bool(s.properties.Vendor_ramdisk_available) || s.ModuleBase.InstallInVendorRamdisk()
+}
+
func (s *ShBinary) RecoveryVariantNeeded(ctx android.BaseModuleContext) bool {
return proptools.Bool(s.properties.Recovery_available) || s.ModuleBase.InstallInRecovery()
}
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 480f9b7..edb8b30 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -404,13 +404,21 @@
// ctx's Platform or Specific functions represent where this sysprop_library installed.
installedInSystem := ctx.Platform() || ctx.SystemExtSpecific()
installedInVendorOrOdm := ctx.SocSpecific() || ctx.DeviceSpecific()
+ installedInProduct := ctx.ProductSpecific()
isOwnerPlatform := false
- stub := "sysprop-library-stub-"
+ var stub string
+
+ if installedInVendorOrOdm {
+ stub = "sysprop-library-stub-vendor"
+ } else if installedInProduct {
+ stub = "sysprop-library-stub-product"
+ } else {
+ stub = "sysprop-library-stub-platform"
+ }
switch m.Owner() {
case "Platform":
// Every partition can access platform-defined properties
- stub += "platform"
isOwnerPlatform = true
case "Vendor":
// System can't access vendor's properties
@@ -418,14 +426,12 @@
ctx.ModuleErrorf("None of soc_specific, device_specific, product_specific is true. " +
"System can't access sysprop_library owned by Vendor")
}
- stub += "vendor"
case "Odm":
// Only vendor can access Odm-defined properties
if !installedInVendorOrOdm {
ctx.ModuleErrorf("Neither soc_speicifc nor device_specific is true. " +
"Odm-defined properties should be accessed only in Vendor or Odm")
}
- stub += "vendor"
default:
ctx.PropertyErrorf("property_owner",
"Unknown value %s: must be one of Platform, Vendor or Odm", m.Owner())
diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go
index 711129c..7a79a1b 100644
--- a/sysprop/sysprop_test.go
+++ b/sysprop/sysprop_test.go
@@ -103,6 +103,8 @@
"api/sysprop-platform-on-product-latest.txt": nil,
"api/sysprop-vendor-current.txt": nil,
"api/sysprop-vendor-latest.txt": nil,
+ "api/sysprop-vendor-on-product-current.txt": nil,
+ "api/sysprop-vendor-on-product-latest.txt": nil,
"api/sysprop-odm-current.txt": nil,
"api/sysprop-odm-latest.txt": nil,
"framework/aidl/a.aidl": nil,
@@ -182,8 +184,15 @@
srcs: ["com/android/VendorProperties.sysprop"],
api_packages: ["com.android"],
property_owner: "Vendor",
+ vendor: true,
+ }
+
+ sysprop_library {
+ name: "sysprop-vendor-on-product",
+ srcs: ["com/android/VendorProperties.sysprop"],
+ api_packages: ["com.android"],
+ property_owner: "Vendor",
product_specific: true,
- vendor_available: true,
}
sysprop_library {
@@ -213,7 +222,7 @@
srcs: ["c.java"],
sdk_version: "system_current",
product_specific: true,
- libs: ["sysprop-platform", "sysprop-vendor"],
+ libs: ["sysprop-platform", "sysprop-vendor-on-product"],
}
java_library {
@@ -240,7 +249,7 @@
name: "cc-client-product",
srcs: ["d.cpp"],
product_specific: true,
- static_libs: ["sysprop-platform-on-product", "sysprop-vendor"],
+ static_libs: ["sysprop-platform-on-product", "sysprop-vendor-on-product"],
}
cc_library {
@@ -268,6 +277,7 @@
system_shared_libs: [],
recovery_available: true,
host_supported: true,
+ llndk_stubs: "liblog.llndk",
}
cc_binary_host {
@@ -276,7 +286,7 @@
}
llndk_library {
- name: "liblog",
+ name: "liblog.llndk",
symbol_file: "",
}
@@ -290,6 +300,12 @@
soc_specific: true,
sdk_version: "core_current",
}
+
+ java_library {
+ name: "sysprop-library-stub-product",
+ product_specific: true,
+ sdk_version: "core_current",
+ }
`)
// Check for generated cc_library
@@ -317,13 +333,14 @@
expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available)
}
- // core variant of vendor-owned sysprop_library is for product
- ctx.ModuleForTests("libsysprop-vendor", variant)
+ // product variant of vendor-owned sysprop_library
+ ctx.ModuleForTests("libsysprop-vendor-on-product", variant)
}
ctx.ModuleForTests("sysprop-platform", "android_common")
ctx.ModuleForTests("sysprop-platform_public", "android_common")
ctx.ModuleForTests("sysprop-vendor", "android_common")
+ ctx.ModuleForTests("sysprop-vendor-on-product", "android_common")
// Check for exported includes
coreVariant := "android_arm64_armv8-a_static"
@@ -336,7 +353,7 @@
platformOnProductPath := "libsysprop-platform-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include"
vendorInternalPath := "libsysprop-vendor/android_vendor.VER_arm64_armv8-a_static/gen/sysprop/include"
- vendorPublicPath := "libsysprop-vendor/android_arm64_armv8-a_static/gen/sysprop/public/include"
+ vendorPublicPath := "libsysprop-vendor-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include"
platformClient := ctx.ModuleForTests("cc-client-platform", coreVariant)
platformFlags := platformClient.Rule("cc").Args["cFlags"]
diff --git a/tradefed/suite_harness/tradefed_binary.go b/tradefed/suite_harness/tradefed_binary.go
index 1bd4f93..a421d8b 100644
--- a/tradefed/suite_harness/tradefed_binary.go
+++ b/tradefed/suite_harness/tradefed_binary.go
@@ -80,7 +80,6 @@
"tradefed",
"tradefed-test-framework",
"loganalysis",
- "hosttestlib",
"compatibility-host-util",
}
diff --git a/ui/build/context.go b/ui/build/context.go
index 3945ce0..43e1e0f 100644
--- a/ui/build/context.go
+++ b/ui/build/context.go
@@ -48,7 +48,7 @@
c.Tracer.Begin(desc, c.Thread)
}
if c.Metrics != nil {
- c.Metrics.TimeTracer.Begin(name, desc, c.Thread)
+ c.Metrics.EventTracer.Begin(name, desc, c.Thread)
}
}
@@ -58,7 +58,7 @@
c.Tracer.End(c.Thread)
}
if c.Metrics != nil {
- c.Metrics.SetTimeMetrics(c.Metrics.TimeTracer.End(c.Thread))
+ c.Metrics.SetTimeMetrics(c.Metrics.EventTracer.End(c.Thread))
}
}
diff --git a/ui/build/kati.go b/ui/build/kati.go
index f6d3a57..f6c0f52 100644
--- a/ui/build/kati.go
+++ b/ui/build/kati.go
@@ -68,6 +68,7 @@
"--ninja_suffix=" + config.KatiSuffix() + extraSuffix,
"--no_ninja_prelude",
"--use_ninja_phony_output",
+ "--use_ninja_symlink_outputs",
"--regen",
"--ignore_optional_include=" + filepath.Join(config.OutDir(), "%.P"),
"--detect_android_echo",
diff --git a/ui/metrics/Android.bp b/ui/metrics/Android.bp
index 8188a69..95c8f5c 100644
--- a/ui/metrics/Android.bp
+++ b/ui/metrics/Android.bp
@@ -23,10 +23,10 @@
],
srcs: [
"metrics.go",
- "time.go",
+ "event.go",
],
testSrcs: [
- "time_test.go",
+ "event_test.go",
],
}
diff --git a/ui/metrics/time.go b/ui/metrics/event.go
similarity index 80%
rename from ui/metrics/time.go
rename to ui/metrics/event.go
index 4016563..5a62847 100644
--- a/ui/metrics/time.go
+++ b/ui/metrics/event.go
@@ -25,7 +25,7 @@
// for testing purpose only
var _now = now
-type timeEvent struct {
+type event struct {
desc string
name string
@@ -33,26 +33,26 @@
start time.Time
}
-type TimeTracer interface {
+type EventTracer interface {
Begin(name, desc string, thread tracer.Thread)
End(thread tracer.Thread) soong_metrics_proto.PerfInfo
}
-type timeTracerImpl struct {
- activeEvents []timeEvent
+type eventTracerImpl struct {
+ activeEvents []event
}
-var _ TimeTracer = &timeTracerImpl{}
+var _ EventTracer = &eventTracerImpl{}
func now() time.Time {
return time.Now()
}
-func (t *timeTracerImpl) Begin(name, desc string, _ tracer.Thread) {
- t.activeEvents = append(t.activeEvents, timeEvent{name: name, desc: desc, start: _now()})
+func (t *eventTracerImpl) Begin(name, desc string, _ tracer.Thread) {
+ t.activeEvents = append(t.activeEvents, event{name: name, desc: desc, start: _now()})
}
-func (t *timeTracerImpl) End(tracer.Thread) soong_metrics_proto.PerfInfo {
+func (t *eventTracerImpl) End(tracer.Thread) soong_metrics_proto.PerfInfo {
if len(t.activeEvents) < 1 {
panic("Internal error: No pending events for endAt to end!")
}
diff --git a/ui/metrics/time_test.go b/ui/metrics/event_test.go
similarity index 88%
rename from ui/metrics/time_test.go
rename to ui/metrics/event_test.go
index d73080a..6fc0b50 100644
--- a/ui/metrics/time_test.go
+++ b/ui/metrics/event_test.go
@@ -28,14 +28,14 @@
_now = func() time.Time { return startTime.Add(dur) }
defer func() { _now = initialNow }()
- timeTracer := &timeTracerImpl{}
- timeTracer.activeEvents = append(timeTracer.activeEvents, timeEvent{
+ eventTracer := &eventTracerImpl{}
+ eventTracer.activeEvents = append(eventTracer.activeEvents, event{
desc: "test",
name: "test",
start: startTime,
})
- perf := timeTracer.End(tracer.Thread(0))
+ perf := eventTracer.End(tracer.Thread(0))
if perf.GetRealTime() != uint64(dur.Nanoseconds()) {
t.Errorf("got %d, want %d nanoseconds for event duration", perf.GetRealTime(), dur.Nanoseconds())
}
diff --git a/ui/metrics/metrics.go b/ui/metrics/metrics.go
index 35d1976..7a3726b 100644
--- a/ui/metrics/metrics.go
+++ b/ui/metrics/metrics.go
@@ -36,14 +36,14 @@
)
type Metrics struct {
- metrics soong_metrics_proto.MetricsBase
- TimeTracer TimeTracer
+ metrics soong_metrics_proto.MetricsBase
+ EventTracer EventTracer
}
func New() (metrics *Metrics) {
m := &Metrics{
- metrics: soong_metrics_proto.MetricsBase{},
- TimeTracer: &timeTracerImpl{},
+ metrics: soong_metrics_proto.MetricsBase{},
+ EventTracer: &eventTracerImpl{},
}
return m
}
diff --git a/ui/metrics/metrics_proto/metrics.pb.go b/ui/metrics/metrics_proto/metrics.pb.go
index e824f6b..b8c5775 100644
--- a/ui/metrics/metrics_proto/metrics.pb.go
+++ b/ui/metrics/metrics_proto/metrics.pb.go
@@ -152,7 +152,7 @@
}
func (ModuleTypeInfo_BuildSystem) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_6039342a2ba47b72, []int{4, 0}
+ return fileDescriptor_6039342a2ba47b72, []int{5, 0}
}
type MetricsBase struct {
@@ -529,11 +529,13 @@
// The real running time.
// The number of nanoseconds elapsed since start_time.
RealTime *uint64 `protobuf:"varint,4,opt,name=real_time,json=realTime" json:"real_time,omitempty"`
- // The number of MB for memory use.
- MemoryUse *uint64 `protobuf:"varint,5,opt,name=memory_use,json=memoryUse" json:"memory_use,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // The number of MB for memory use (deprecated as it is too generic).
+ MemoryUse *uint64 `protobuf:"varint,5,opt,name=memory_use,json=memoryUse" json:"memory_use,omitempty"` // Deprecated: Do not use.
+ // The resource information of each executed process.
+ ProcessesResourceInfo []*ProcessResourceInfo `protobuf:"bytes,6,rep,name=processes_resource_info,json=processesResourceInfo" json:"processes_resource_info,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *PerfInfo) Reset() { *m = PerfInfo{} }
@@ -589,6 +591,7 @@
return 0
}
+// Deprecated: Do not use.
func (m *PerfInfo) GetMemoryUse() uint64 {
if m != nil && m.MemoryUse != nil {
return *m.MemoryUse
@@ -596,6 +599,134 @@
return 0
}
+func (m *PerfInfo) GetProcessesResourceInfo() []*ProcessResourceInfo {
+ if m != nil {
+ return m.ProcessesResourceInfo
+ }
+ return nil
+}
+
+type ProcessResourceInfo struct {
+ // The name of the process for identification.
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ // The amount of time spent executing in user space in microseconds.
+ UserTimeMicros *uint64 `protobuf:"varint,2,opt,name=user_time_micros,json=userTimeMicros" json:"user_time_micros,omitempty"`
+ // The amount of time spent executing in kernel mode in microseconds.
+ SystemTimeMicros *uint64 `protobuf:"varint,3,opt,name=system_time_micros,json=systemTimeMicros" json:"system_time_micros,omitempty"`
+ // The maximum resident set size memory used in kilobytes.
+ MaxRssKb *uint64 `protobuf:"varint,4,opt,name=max_rss_kb,json=maxRssKb" json:"max_rss_kb,omitempty"`
+ // The number of minor page faults serviced without any I/O activity.
+ MinorPageFaults *uint64 `protobuf:"varint,5,opt,name=minor_page_faults,json=minorPageFaults" json:"minor_page_faults,omitempty"`
+ // The number of major page faults serviced that required I/O activity.
+ MajorPageFaults *uint64 `protobuf:"varint,6,opt,name=major_page_faults,json=majorPageFaults" json:"major_page_faults,omitempty"`
+ // Total IO input in kilobytes.
+ IoInputKb *uint64 `protobuf:"varint,7,opt,name=io_input_kb,json=ioInputKb" json:"io_input_kb,omitempty"`
+ // Total IO output in kilobytes.
+ IoOutputKb *uint64 `protobuf:"varint,8,opt,name=io_output_kb,json=ioOutputKb" json:"io_output_kb,omitempty"`
+ // The number of voluntary context switches
+ VoluntaryContextSwitches *uint64 `protobuf:"varint,9,opt,name=voluntary_context_switches,json=voluntaryContextSwitches" json:"voluntary_context_switches,omitempty"`
+ // The number of involuntary context switches
+ InvoluntaryContextSwitches *uint64 `protobuf:"varint,10,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *ProcessResourceInfo) Reset() { *m = ProcessResourceInfo{} }
+func (m *ProcessResourceInfo) String() string { return proto.CompactTextString(m) }
+func (*ProcessResourceInfo) ProtoMessage() {}
+func (*ProcessResourceInfo) Descriptor() ([]byte, []int) {
+ return fileDescriptor_6039342a2ba47b72, []int{4}
+}
+
+func (m *ProcessResourceInfo) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_ProcessResourceInfo.Unmarshal(m, b)
+}
+func (m *ProcessResourceInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_ProcessResourceInfo.Marshal(b, m, deterministic)
+}
+func (m *ProcessResourceInfo) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_ProcessResourceInfo.Merge(m, src)
+}
+func (m *ProcessResourceInfo) XXX_Size() int {
+ return xxx_messageInfo_ProcessResourceInfo.Size(m)
+}
+func (m *ProcessResourceInfo) XXX_DiscardUnknown() {
+ xxx_messageInfo_ProcessResourceInfo.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_ProcessResourceInfo proto.InternalMessageInfo
+
+func (m *ProcessResourceInfo) GetName() string {
+ if m != nil && m.Name != nil {
+ return *m.Name
+ }
+ return ""
+}
+
+func (m *ProcessResourceInfo) GetUserTimeMicros() uint64 {
+ if m != nil && m.UserTimeMicros != nil {
+ return *m.UserTimeMicros
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetSystemTimeMicros() uint64 {
+ if m != nil && m.SystemTimeMicros != nil {
+ return *m.SystemTimeMicros
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetMaxRssKb() uint64 {
+ if m != nil && m.MaxRssKb != nil {
+ return *m.MaxRssKb
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetMinorPageFaults() uint64 {
+ if m != nil && m.MinorPageFaults != nil {
+ return *m.MinorPageFaults
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetMajorPageFaults() uint64 {
+ if m != nil && m.MajorPageFaults != nil {
+ return *m.MajorPageFaults
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetIoInputKb() uint64 {
+ if m != nil && m.IoInputKb != nil {
+ return *m.IoInputKb
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetIoOutputKb() uint64 {
+ if m != nil && m.IoOutputKb != nil {
+ return *m.IoOutputKb
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetVoluntaryContextSwitches() uint64 {
+ if m != nil && m.VoluntaryContextSwitches != nil {
+ return *m.VoluntaryContextSwitches
+ }
+ return 0
+}
+
+func (m *ProcessResourceInfo) GetInvoluntaryContextSwitches() uint64 {
+ if m != nil && m.InvoluntaryContextSwitches != nil {
+ return *m.InvoluntaryContextSwitches
+ }
+ return 0
+}
+
type ModuleTypeInfo struct {
// The build system, eg. Soong or Make.
BuildSystem *ModuleTypeInfo_BuildSystem `protobuf:"varint,1,opt,name=build_system,json=buildSystem,enum=soong_build_metrics.ModuleTypeInfo_BuildSystem,def=0" json:"build_system,omitempty"`
@@ -612,7 +743,7 @@
func (m *ModuleTypeInfo) String() string { return proto.CompactTextString(m) }
func (*ModuleTypeInfo) ProtoMessage() {}
func (*ModuleTypeInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_6039342a2ba47b72, []int{4}
+ return fileDescriptor_6039342a2ba47b72, []int{5}
}
func (m *ModuleTypeInfo) XXX_Unmarshal(b []byte) error {
@@ -670,7 +801,7 @@
func (m *CriticalUserJourneyMetrics) String() string { return proto.CompactTextString(m) }
func (*CriticalUserJourneyMetrics) ProtoMessage() {}
func (*CriticalUserJourneyMetrics) Descriptor() ([]byte, []int) {
- return fileDescriptor_6039342a2ba47b72, []int{5}
+ return fileDescriptor_6039342a2ba47b72, []int{6}
}
func (m *CriticalUserJourneyMetrics) XXX_Unmarshal(b []byte) error {
@@ -717,7 +848,7 @@
func (m *CriticalUserJourneysMetrics) String() string { return proto.CompactTextString(m) }
func (*CriticalUserJourneysMetrics) ProtoMessage() {}
func (*CriticalUserJourneysMetrics) Descriptor() ([]byte, []int) {
- return fileDescriptor_6039342a2ba47b72, []int{6}
+ return fileDescriptor_6039342a2ba47b72, []int{7}
}
func (m *CriticalUserJourneysMetrics) XXX_Unmarshal(b []byte) error {
@@ -765,7 +896,7 @@
func (m *SoongBuildMetrics) String() string { return proto.CompactTextString(m) }
func (*SoongBuildMetrics) ProtoMessage() {}
func (*SoongBuildMetrics) Descriptor() ([]byte, []int) {
- return fileDescriptor_6039342a2ba47b72, []int{7}
+ return fileDescriptor_6039342a2ba47b72, []int{8}
}
func (m *SoongBuildMetrics) XXX_Unmarshal(b []byte) error {
@@ -829,6 +960,7 @@
proto.RegisterType((*BuildConfig)(nil), "soong_build_metrics.BuildConfig")
proto.RegisterType((*SystemResourceInfo)(nil), "soong_build_metrics.SystemResourceInfo")
proto.RegisterType((*PerfInfo)(nil), "soong_build_metrics.PerfInfo")
+ proto.RegisterType((*ProcessResourceInfo)(nil), "soong_build_metrics.ProcessResourceInfo")
proto.RegisterType((*ModuleTypeInfo)(nil), "soong_build_metrics.ModuleTypeInfo")
proto.RegisterType((*CriticalUserJourneyMetrics)(nil), "soong_build_metrics.CriticalUserJourneyMetrics")
proto.RegisterType((*CriticalUserJourneysMetrics)(nil), "soong_build_metrics.CriticalUserJourneysMetrics")
@@ -840,76 +972,90 @@
}
var fileDescriptor_6039342a2ba47b72 = []byte{
- // 1130 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x6f, 0x6f, 0xd4, 0x46,
- 0x13, 0xc7, 0xc9, 0x25, 0x77, 0x1e, 0xe7, 0x0e, 0x67, 0x13, 0x1e, 0x0c, 0x08, 0x3d, 0x91, 0x55,
- 0x68, 0x54, 0x95, 0x80, 0xae, 0x28, 0x42, 0x11, 0xaa, 0x94, 0x1c, 0x11, 0xa5, 0xe8, 0x72, 0x68,
- 0xc3, 0x51, 0xda, 0xbe, 0xb0, 0xf6, 0xec, 0xbd, 0xc4, 0xd4, 0xf6, 0x5a, 0xbb, 0x6b, 0xc4, 0xf1,
- 0x1d, 0xfa, 0xa9, 0xfa, 0x59, 0xfa, 0x11, 0xfa, 0xbe, 0xda, 0x59, 0xfb, 0xee, 0x28, 0xd7, 0x82,
- 0x78, 0x77, 0x9e, 0xdf, 0x9f, 0x9d, 0x19, 0x8f, 0x67, 0x0f, 0xba, 0x39, 0xd7, 0x32, 0x8d, 0xd5,
- 0x41, 0x29, 0x85, 0x16, 0x64, 0x47, 0x09, 0x51, 0x5c, 0x44, 0x93, 0x2a, 0xcd, 0x92, 0xa8, 0x86,
- 0xc2, 0xbf, 0x3c, 0xf0, 0x86, 0xf6, 0xf7, 0x09, 0x53, 0x9c, 0x3c, 0x80, 0x5d, 0x4b, 0x48, 0x98,
- 0xe6, 0x91, 0x4e, 0x73, 0xae, 0x34, 0xcb, 0xcb, 0xc0, 0xd9, 0x73, 0xf6, 0xd7, 0x29, 0x41, 0xec,
- 0x09, 0xd3, 0xfc, 0x65, 0x83, 0x90, 0x1b, 0xd0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, 0x3f,
+ 0x0c, 0x00, 0x00,
}
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index 3586be0..44f8859 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -135,8 +135,43 @@
// The number of nanoseconds elapsed since start_time.
optional uint64 real_time = 4;
- // The number of MB for memory use.
- optional uint64 memory_use = 5;
+ // The number of MB for memory use (deprecated as it is too generic).
+ optional uint64 memory_use = 5 [deprecated=true];
+
+ // The resource information of each executed process.
+ repeated ProcessResourceInfo processes_resource_info = 6;
+}
+
+message ProcessResourceInfo {
+ // The name of the process for identification.
+ optional string name = 1;
+
+ // The amount of time spent executing in user space in microseconds.
+ optional uint64 user_time_micros = 2;
+
+ // The amount of time spent executing in kernel mode in microseconds.
+ optional uint64 system_time_micros = 3;
+
+ // The maximum resident set size memory used in kilobytes.
+ optional uint64 max_rss_kb = 4;
+
+ // The number of minor page faults serviced without any I/O activity.
+ optional uint64 minor_page_faults = 5;
+
+ // The number of major page faults serviced that required I/O activity.
+ optional uint64 major_page_faults = 6;
+
+ // Total IO input in kilobytes.
+ optional uint64 io_input_kb= 7;
+
+ // Total IO output in kilobytes.
+ optional uint64 io_output_kb = 8;
+
+ // The number of voluntary context switches
+ optional uint64 voluntary_context_switches = 9;
+
+ // The number of involuntary context switches
+ optional uint64 involuntary_context_switches = 10;
}
message ModuleTypeInfo {
diff --git a/ui/status/ninja.go b/ui/status/ninja.go
index a11774c..765679f 100644
--- a/ui/status/ninja.go
+++ b/ui/status/ninja.go
@@ -162,6 +162,17 @@
Action: started,
Output: msg.EdgeFinished.GetOutput(),
Error: err,
+ Stats: ActionResultStats{
+ UserTime: msg.EdgeFinished.GetUserTime(),
+ SystemTime: msg.EdgeFinished.GetSystemTime(),
+ MaxRssKB: msg.EdgeFinished.GetMaxRssKb(),
+ MinorPageFaults: msg.EdgeFinished.GetMinorPageFaults(),
+ MajorPageFaults: msg.EdgeFinished.GetMajorPageFaults(),
+ IOInputKB: msg.EdgeFinished.GetIoInputKb(),
+ IOOutputKB: msg.EdgeFinished.GetIoOutputKb(),
+ VoluntaryContextSwitches: msg.EdgeFinished.GetVoluntaryContextSwitches(),
+ InvoluntaryContextSwitches: msg.EdgeFinished.GetInvoluntaryContextSwitches(),
+ },
})
}
}
diff --git a/ui/status/ninja_frontend/frontend.pb.go b/ui/status/ninja_frontend/frontend.pb.go
index 7ba9de2..86e474b 100644
--- a/ui/status/ninja_frontend/frontend.pb.go
+++ b/ui/status/ninja_frontend/frontend.pb.go
@@ -371,10 +371,24 @@
// Number of milliseconds spent executing in user mode
UserTime *uint32 `protobuf:"varint,5,opt,name=user_time,json=userTime" json:"user_time,omitempty"`
// Number of milliseconds spent executing in kernel mode
- SystemTime *uint32 `protobuf:"varint,6,opt,name=system_time,json=systemTime" json:"system_time,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ SystemTime *uint32 `protobuf:"varint,6,opt,name=system_time,json=systemTime" json:"system_time,omitempty"`
+ // Max resident set size in kB
+ MaxRssKb *uint64 `protobuf:"varint,7,opt,name=max_rss_kb,json=maxRssKb" json:"max_rss_kb,omitempty"`
+ // Minor page faults
+ MinorPageFaults *uint64 `protobuf:"varint,8,opt,name=minor_page_faults,json=minorPageFaults" json:"minor_page_faults,omitempty"`
+ // Major page faults
+ MajorPageFaults *uint64 `protobuf:"varint,9,opt,name=major_page_faults,json=majorPageFaults" json:"major_page_faults,omitempty"`
+ // IO input in kB
+ IoInputKb *uint64 `protobuf:"varint,10,opt,name=io_input_kb,json=ioInputKb" json:"io_input_kb,omitempty"`
+ // IO output in kB
+ IoOutputKb *uint64 `protobuf:"varint,11,opt,name=io_output_kb,json=ioOutputKb" json:"io_output_kb,omitempty"`
+ // Voluntary context switches
+ VoluntaryContextSwitches *uint64 `protobuf:"varint,12,opt,name=voluntary_context_switches,json=voluntaryContextSwitches" json:"voluntary_context_switches,omitempty"`
+ // Involuntary context switches
+ InvoluntaryContextSwitches *uint64 `protobuf:"varint,13,opt,name=involuntary_context_switches,json=involuntaryContextSwitches" json:"involuntary_context_switches,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Status_EdgeFinished) Reset() { *m = Status_EdgeFinished{} }
@@ -444,6 +458,55 @@
return 0
}
+func (m *Status_EdgeFinished) GetMaxRssKb() uint64 {
+ if m != nil && m.MaxRssKb != nil {
+ return *m.MaxRssKb
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetMinorPageFaults() uint64 {
+ if m != nil && m.MinorPageFaults != nil {
+ return *m.MinorPageFaults
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetMajorPageFaults() uint64 {
+ if m != nil && m.MajorPageFaults != nil {
+ return *m.MajorPageFaults
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetIoInputKb() uint64 {
+ if m != nil && m.IoInputKb != nil {
+ return *m.IoInputKb
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetIoOutputKb() uint64 {
+ if m != nil && m.IoOutputKb != nil {
+ return *m.IoOutputKb
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetVoluntaryContextSwitches() uint64 {
+ if m != nil && m.VoluntaryContextSwitches != nil {
+ return *m.VoluntaryContextSwitches
+ }
+ return 0
+}
+
+func (m *Status_EdgeFinished) GetInvoluntaryContextSwitches() uint64 {
+ if m != nil && m.InvoluntaryContextSwitches != nil {
+ return *m.InvoluntaryContextSwitches
+ }
+ return 0
+}
+
type Status_Message struct {
// Message priority level (DEBUG, INFO, WARNING, ERROR).
Level *Status_Message_Level `protobuf:"varint,1,opt,name=level,enum=ninja.Status_Message_Level,def=0" json:"level,omitempty"`
@@ -511,39 +574,48 @@
}
var fileDescriptor_eca3873955a29cfe = []byte{
- // 539 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0xd1, 0x6e, 0xd3, 0x4a,
- 0x10, 0xbd, 0x4e, 0xe2, 0x38, 0x1e, 0x27, 0xb9, 0x61, 0x25, 0x90, 0xeb, 0x0a, 0x35, 0xea, 0x53,
- 0x5f, 0x08, 0x12, 0x42, 0x42, 0x20, 0x24, 0x44, 0x44, 0x5a, 0x8a, 0x20, 0x95, 0xb6, 0x45, 0x48,
- 0xbc, 0x44, 0x4e, 0x77, 0x5a, 0x8c, 0xec, 0x75, 0xe4, 0xdd, 0x54, 0xe2, 0x37, 0xf8, 0x09, 0xfe,
- 0x80, 0xaf, 0xe3, 0x01, 0xed, 0xec, 0xda, 0x75, 0x68, 0xdf, 0x7c, 0x76, 0xce, 0x9c, 0x39, 0x7b,
- 0x76, 0x64, 0x18, 0x5f, 0x55, 0xa5, 0xd4, 0x28, 0xc5, 0x6c, 0x53, 0x95, 0xba, 0x64, 0xbe, 0xcc,
- 0xe4, 0xf7, 0xf4, 0xf0, 0x4f, 0x00, 0xfd, 0x73, 0x9d, 0xea, 0xad, 0x62, 0x2f, 0x21, 0xd2, 0xa5,
- 0x4e, 0xf3, 0x15, 0x8a, 0x6b, 0x54, 0xb1, 0x37, 0xf5, 0x8e, 0xa2, 0x67, 0xf1, 0x8c, 0x78, 0x33,
- 0xcb, 0x99, 0x5d, 0x18, 0xc2, 0xc2, 0xd4, 0x39, 0xe8, 0xe6, 0x9b, 0xbd, 0x81, 0xd1, 0x7a, 0x9b,
- 0xe5, 0x62, 0xa5, 0x74, 0x5a, 0x69, 0x14, 0x71, 0x87, 0x9a, 0x93, 0xdd, 0xe6, 0xb9, 0xa1, 0x9c,
- 0x5b, 0x06, 0x1f, 0xae, 0x5b, 0x88, 0xcd, 0x61, 0x6c, 0x05, 0xae, 0x32, 0x99, 0xa9, 0x6f, 0x28,
- 0xe2, 0x2e, 0x29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 0x6a, 0x96, 0x5d, 0x05, 0x53, 0xf3, 0x86, 0x5c, 0xea, 0x40,
+ 0xfd, 0x14, 0x7a, 0x7a, 0xc6, 0x95, 0xd7, 0x43, 0xde, 0x9b, 0x13, 0xef, 0x2c, 0x70, 0x54, 0xc4,
+ 0xc9, 0x1b, 0x58, 0x13, 0xe9, 0x7f, 0xf2, 0xfb, 0x98, 0xef, 0x57, 0x98, 0x1b, 0x0a, 0xfe, 0xaf,
+ 0x1a, 0x74, 0x8a, 0x7f, 0x87, 0xbc, 0x80, 0x56, 0xcc, 0x2f, 0x78, 0x8c, 0xfb, 0x1d, 0xdc, 0x7c,
+ 0x1d, 0x0a, 0x6a, 0xfc, 0xc9, 0x20, 0xaf, 0x9a, 0x7b, 0x07, 0x3b, 0x87, 0xd4, 0xf2, 0xe6, 0x02,
+ 0x95, 0x3f, 0x67, 0xdd, 0x5e, 0xad, 0xc2, 0xdc, 0x78, 0x0e, 0x2d, 0xe4, 0x49, 0x17, 0x30, 0x63,
+ 0x78, 0x8f, 0xb8, 0xd0, 0xf9, 0xf6, 0x96, 0x1e, 0xec, 0x1d, 0xec, 0x0e, 0x6b, 0xc4, 0x81, 0xd6,
+ 0x36, 0xa5, 0x87, 0x74, 0x58, 0x37, 0x9f, 0xef, 0xb7, 0x27, 0x5f, 0x77, 0x87, 0x8d, 0x09, 0xf9,
+ 0xd0, 0xf8, 0x3e, 0xc0, 0xe2, 0x41, 0xf9, 0xae, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x7a,
+ 0x33, 0x13, 0x62, 0x05, 0x00, 0x00,
}
diff --git a/ui/status/ninja_frontend/frontend.proto b/ui/status/ninja_frontend/frontend.proto
index baa0046..e5e5d9f 100644
--- a/ui/status/ninja_frontend/frontend.proto
+++ b/ui/status/ninja_frontend/frontend.proto
@@ -65,6 +65,20 @@
optional uint32 user_time = 5;
// Number of milliseconds spent executing in kernel mode
optional uint32 system_time = 6;
+ // Max resident set size in kB
+ optional uint64 max_rss_kb = 7;
+ // Minor page faults
+ optional uint64 minor_page_faults = 8;
+ // Major page faults
+ optional uint64 major_page_faults = 9;
+ // IO input in kB
+ optional uint64 io_input_kb = 10;
+ // IO output in kB
+ optional uint64 io_output_kb = 11;
+ // Voluntary context switches
+ optional uint64 voluntary_context_switches = 12;
+ // Involuntary context switches
+ optional uint64 involuntary_context_switches = 13;
}
message Message {
diff --git a/ui/status/status.go b/ui/status/status.go
index df33baa..a5b4a28 100644
--- a/ui/status/status.go
+++ b/ui/status/status.go
@@ -54,6 +54,37 @@
// Error is nil if the Action succeeded, or set to an error if it
// failed.
Error error
+
+ Stats ActionResultStats
+}
+
+type ActionResultStats struct {
+ // Number of milliseconds spent executing in user mode
+ UserTime uint32
+
+ // Number of milliseconds spent executing in kernel mode
+ SystemTime uint32
+
+ // Max resident set size in kB
+ MaxRssKB uint64
+
+ // Minor page faults
+ MinorPageFaults uint64
+
+ // Major page faults
+ MajorPageFaults uint64
+
+ // IO input in kB
+ IOInputKB uint64
+
+ // IO output in kB
+ IOOutputKB uint64
+
+ // Voluntary context switches
+ VoluntaryContextSwitches uint64
+
+ // Involuntary context switches
+ InvoluntaryContextSwitches uint64
}
// Counts describes the number of actions in each state
diff --git a/ui/tracer/status.go b/ui/tracer/status.go
index c831255..a8b4e62 100644
--- a/ui/tracer/status.go
+++ b/ui/tracer/status.go
@@ -80,9 +80,32 @@
Dur: uint64(time.Since(start.start).Nanoseconds()) / 1000,
Pid: 1,
Tid: uint64(start.cpu),
+ Arg: &statsArg{
+ UserTime: result.Stats.UserTime,
+ SystemTime: result.Stats.SystemTime,
+ MaxRssKB: result.Stats.MaxRssKB,
+ MinorPageFaults: result.Stats.MinorPageFaults,
+ MajorPageFaults: result.Stats.MajorPageFaults,
+ IOInputKB: result.Stats.IOInputKB,
+ IOOutputKB: result.Stats.IOOutputKB,
+ VoluntaryContextSwitches: result.Stats.VoluntaryContextSwitches,
+ InvoluntaryContextSwitches: result.Stats.InvoluntaryContextSwitches,
+ },
})
}
+type statsArg struct {
+ UserTime uint32 `json:"user_time"`
+ SystemTime uint32 `json:"system_time_ms"`
+ MaxRssKB uint64 `json:"max_rss_kb"`
+ MinorPageFaults uint64 `json:"minor_page_faults"`
+ MajorPageFaults uint64 `json:"major_page_faults"`
+ IOInputKB uint64 `json:"io_input_kb"`
+ IOOutputKB uint64 `json:"io_output_kb"`
+ VoluntaryContextSwitches uint64 `json:"voluntary_context_switches"`
+ InvoluntaryContextSwitches uint64 `json:"involuntary_context_switches"`
+}
+
func (s *statusOutput) Flush() {}
func (s *statusOutput) Message(level status.MsgLevel, message string) {}