Merge "Rename ninja variables with Clang in the name"
diff --git a/android/bazel.go b/android/bazel.go
index 992d8aa..8d13762 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -180,7 +180,6 @@
// also depends on //system/logging/liblog:liblog (http://b/186822772)
"libc_ndk", // http://b/187013218, cc_library_static, depends on //bionic/libm:libm (http://b/183064661)
"libc_malloc_hooks", // http://b/187016307, cc_library, ld.lld: error: undefined symbol: __malloc_hook
- "libm", // http://b/183064661, cc_library, math.h:25:16: error: unexpected token in argument list
// http://b/186823769: Needs C++ STL support, includes from unconverted standard libraries in //external/libcxx
// c++_static
@@ -189,7 +188,7 @@
"libBionicBenchmarksUtils", // cc_library_static, fatal error: 'map' file not found, from libcxx
"fmtlib", // cc_library_static, fatal error: 'cassert' file not found, from libcxx
"fmtlib_ndk", // cc_library_static, fatal error: 'cassert' file not found
- "libbase", // http://b/186826479, cc_library, fatal error: 'memory' file not found, from libcxx
+ "libbase", // Requires liblog. http://b/186826479, cc_library, fatal error: 'memory' file not found, from libcxx.
// http://b/186024507: Includes errors because of the system_shared_libs default value.
// Missing -isystem bionic/libc/include through the libc/libm/libdl
diff --git a/android/config.go b/android/config.go
index ed90c31..396b1a6 100644
--- a/android/config.go
+++ b/android/config.go
@@ -821,6 +821,12 @@
return Bool(c.productVariables.Unbundled_build_apps)
}
+// Returns true if building image that aren't bundled with the platform.
+// UnbundledBuild() is always true when this is true.
+func (c *config) UnbundledBuildImage() bool {
+ return Bool(c.productVariables.Unbundled_build_image)
+}
+
// Returns true if building modules against prebuilt SDKs.
func (c *config) AlwaysUsePrebuiltSdks() bool {
return Bool(c.productVariables.Always_use_prebuilt_sdks)
diff --git a/android/module.go b/android/module.go
index 196b095..11f63bd 100644
--- a/android/module.go
+++ b/android/module.go
@@ -2812,44 +2812,85 @@
return m.bp
}
-// SrcIsModule decodes module references in the format ":name" into the module name, or empty string if the input
-// was not a module reference.
+// SrcIsModule decodes module references in the format ":unqualified-name" or "//namespace:name"
+// into the module name, or empty string if the input was not a module reference.
func SrcIsModule(s string) (module string) {
- if len(s) > 1 && s[0] == ':' {
- return s[1:]
+ if len(s) > 1 {
+ if s[0] == ':' {
+ module = s[1:]
+ if !isUnqualifiedModuleName(module) {
+ // The module name should be unqualified but is not so do not treat it as a module.
+ module = ""
+ }
+ } else if s[0] == '/' && s[1] == '/' {
+ module = s
+ }
}
- return ""
+ return module
}
-// SrcIsModule decodes module references in the format ":name{.tag}" into the module name and tag, ":name" into the
-// module name and an empty string for the tag, or empty strings if the input was not a module reference.
+// SrcIsModuleWithTag decodes module references in the format ":unqualified-name{.tag}" or
+// "//namespace:name{.tag}" into the module name and tag, ":unqualified-name" or "//namespace:name"
+// into the module name and an empty string for the tag, or empty strings if the input was not a
+// module reference.
func SrcIsModuleWithTag(s string) (module, tag string) {
- if len(s) > 1 && s[0] == ':' {
- module = s[1:]
- if tagStart := strings.IndexByte(module, '{'); tagStart > 0 {
- if module[len(module)-1] == '}' {
- tag = module[tagStart+1 : len(module)-1]
- module = module[:tagStart]
- return module, tag
+ if len(s) > 1 {
+ if s[0] == ':' {
+ module = s[1:]
+ } else if s[0] == '/' && s[1] == '/' {
+ module = s
+ }
+
+ if module != "" {
+ if tagStart := strings.IndexByte(module, '{'); tagStart > 0 {
+ if module[len(module)-1] == '}' {
+ tag = module[tagStart+1 : len(module)-1]
+ module = module[:tagStart]
+ }
+ }
+
+ if s[0] == ':' && !isUnqualifiedModuleName(module) {
+ // The module name should be unqualified but is not so do not treat it as a module.
+ module = ""
+ tag = ""
}
}
- return module, ""
}
- return "", ""
+
+ return module, tag
}
+// isUnqualifiedModuleName makes sure that the supplied module is an unqualified module name, i.e.
+// does not contain any /.
+func isUnqualifiedModuleName(module string) bool {
+ return strings.IndexByte(module, '/') == -1
+}
+
+// sourceOrOutputDependencyTag is the dependency tag added automatically by pathDepsMutator for any
+// module reference in a property annotated with `android:"path"` or passed to ExtractSourceDeps
+// or ExtractSourcesDeps.
+//
+// If uniquely identifies the dependency that was added as it contains both the module name used to
+// add the dependency as well as the tag. That makes it very simple to find the matching dependency
+// in GetModuleFromPathDep as all it needs to do is find the dependency whose tag matches the tag
+// used to add it. It does not need to check that the module name as returned by one of
+// Module.Name(), BaseModuleContext.OtherModuleName() or ModuleBase.BaseModuleName() matches the
+// name supplied in the tag. That means it does not need to handle differences in module names
+// caused by prebuilt_ prefix, or fully qualified module names.
type sourceOrOutputDependencyTag struct {
blueprint.BaseDependencyTag
+
+ // The name of the module.
+ moduleName string
+
+ // The tag that will be passed to the module's OutputFileProducer.OutputFiles(tag) method.
tag string
}
-func sourceOrOutputDepTag(tag string) blueprint.DependencyTag {
- return sourceOrOutputDependencyTag{tag: tag}
+func sourceOrOutputDepTag(moduleName, tag string) blueprint.DependencyTag {
+ return sourceOrOutputDependencyTag{moduleName: moduleName, tag: tag}
}
-// Deprecated, use IsSourceDepTagWithOutputTag(tag, "") instead.
-var SourceDepTag = sourceOrOutputDepTag("")
-
// IsSourceDepTag returns true if the supplied blueprint.DependencyTag is one that was used to add
// dependencies by either ExtractSourceDeps, ExtractSourcesDeps or automatically for properties
// tagged with `android:"path"`.
@@ -2880,7 +2921,7 @@
ctx.ModuleErrorf("found source dependency duplicate: %q!", s)
} else {
set[s] = true
- ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(t), m)
+ ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(m, t), m)
}
}
}
@@ -2893,7 +2934,7 @@
func ExtractSourceDeps(ctx BottomUpMutatorContext, s *string) {
if s != nil {
if m, t := SrcIsModuleWithTag(*s); m != "" {
- ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(t), m)
+ ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(m, t), m)
}
}
}
diff --git a/android/module_test.go b/android/module_test.go
index 9ac9291..9e2b0ca 100644
--- a/android/module_test.go
+++ b/android/module_test.go
@@ -55,6 +55,27 @@
},
wantModule: "foo:bar",
},
+ {
+ name: "fully qualified",
+ args: args{
+ s: "//foo:bar",
+ },
+ wantModule: "//foo:bar",
+ },
+ {
+ name: "fully qualified with tag",
+ args: args{
+ s: "//foo:bar{.tag}",
+ },
+ wantModule: "//foo:bar{.tag}",
+ },
+ {
+ name: "invalid unqualified name",
+ args: args{
+ s: ":foo/bar",
+ },
+ wantModule: "",
+ },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
@@ -128,6 +149,35 @@
},
wantModule: "foo.bar}",
},
+ {
+ name: "fully qualified",
+ args: args{
+ s: "//foo:bar",
+ },
+ wantModule: "//foo:bar",
+ },
+ {
+ name: "fully qualified with tag",
+ args: args{
+ s: "//foo:bar{.tag}",
+ },
+ wantModule: "//foo:bar",
+ wantTag: ".tag",
+ },
+ {
+ name: "invalid unqualified name",
+ args: args{
+ s: ":foo/bar",
+ },
+ wantModule: "",
+ },
+ {
+ name: "invalid unqualified name with tag",
+ args: args{
+ s: ":foo/bar{.tag}",
+ },
+ wantModule: "",
+ },
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
diff --git a/android/path_properties.go b/android/path_properties.go
index 4446773..3976880 100644
--- a/android/path_properties.go
+++ b/android/path_properties.go
@@ -51,7 +51,7 @@
// Add dependencies to anything that is a module reference.
for _, s := range pathProperties {
if m, t := SrcIsModuleWithTag(s); m != "" {
- ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(t), m)
+ ctx.AddDependency(ctx.Module(), sourceOrOutputDepTag(m, t), m)
}
}
}
diff --git a/android/paths.go b/android/paths.go
index c5e4806..bec8a51 100644
--- a/android/paths.go
+++ b/android/paths.go
@@ -88,7 +88,8 @@
// the Path methods that rely on module dependencies having been resolved.
type ModuleWithDepsPathContext interface {
EarlyModulePathContext
- GetDirectDepWithTag(name string, tag blueprint.DependencyTag) blueprint.Module
+ VisitDirectDepsBlueprint(visit func(blueprint.Module))
+ OtherModuleDependencyTag(m blueprint.Module) blueprint.DependencyTag
}
// ModuleMissingDepsPathContext is a subset of *ModuleContext methods required by
@@ -484,10 +485,27 @@
//
// If tag is "" then the returned module will be the dependency that was added for ":moduleName".
// Otherwise, it is the dependency that was added for ":moduleName{tag}".
-//
-// TODO(b/193228441) Make this handle fully qualified names, e.g. //namespace:moduleName.
func GetModuleFromPathDep(ctx ModuleWithDepsPathContext, moduleName, tag string) blueprint.Module {
- return ctx.GetDirectDepWithTag(moduleName, sourceOrOutputDepTag(tag))
+ var found blueprint.Module
+ // The sourceOrOutputDepTag uniquely identifies the module dependency as it contains both the
+ // module name and the tag. Dependencies added automatically for properties tagged with
+ // `android:"path"` are deduped so are guaranteed to be unique. It is possible for duplicate
+ // dependencies to be added manually using ExtractSourcesDeps or ExtractSourceDeps but even then
+ // it will always be the case that the dependencies will be identical, i.e. the same tag and same
+ // moduleName referring to the same dependency module.
+ //
+ // It does not matter whether the moduleName is a fully qualified name or if the module
+ // dependency is a prebuilt module. All that matters is the same information is supplied to
+ // create the tag here as was supplied to create the tag when the dependency was added so that
+ // this finds the matching dependency module.
+ expectedTag := sourceOrOutputDepTag(moduleName, tag)
+ ctx.VisitDirectDepsBlueprint(func(module blueprint.Module) {
+ depTag := ctx.OtherModuleDependencyTag(module)
+ if depTag == expectedTag {
+ found = module
+ }
+ })
+ return found
}
// PathsAndMissingDepsForModuleSrcExcludes returns a Paths{} containing the resolved references in
@@ -1268,10 +1286,11 @@
// PathForModuleSrc returns a Path representing the paths... under the
// module's local source directory.
func PathForModuleSrc(ctx ModuleMissingDepsPathContext, pathComponents ...string) Path {
- p, err := validatePath(pathComponents...)
- if err != nil {
- reportPathError(ctx, err)
- }
+ // Just join the components textually just to make sure that it does not corrupt a fully qualified
+ // module reference, e.g. if the pathComponents is "://other:foo" then using filepath.Join() or
+ // validatePath() will corrupt it, e.g. replace "//" with "/". If the path is not a module
+ // reference then it will be validated by expandOneSrcPath anyway when it calls expandOneSrcPath.
+ p := strings.Join(pathComponents, string(filepath.Separator))
paths, err := expandOneSrcPath(ctx, p, nil)
if err != nil {
if depErr, ok := err.(missingDependencyError); ok {
diff --git a/android/paths_test.go b/android/paths_test.go
index 6f5d79e..f4e4ce1 100644
--- a/android/paths_test.go
+++ b/android/paths_test.go
@@ -1125,6 +1125,12 @@
rels []string
src string
rel string
+
+ // Make test specific preparations to the test fixture.
+ preparer FixturePreparer
+
+ // A test specific error handler.
+ errorHandler FixtureErrorHandler
}
func testPathForModuleSrc(t *testing.T, tests []pathForModuleSrcTestCase) {
@@ -1157,14 +1163,23 @@
"foo/src_special/$": nil,
}
+ errorHandler := test.errorHandler
+ if errorHandler == nil {
+ errorHandler = FixtureExpectsNoErrors
+ }
+
result := GroupFixturePreparers(
FixtureRegisterWithContext(func(ctx RegistrationContext) {
ctx.RegisterModuleType("test", pathForModuleSrcTestModuleFactory)
ctx.RegisterModuleType("output_file_provider", pathForModuleSrcOutputFileProviderModuleFactory)
- ctx.RegisterModuleType("filegroup", FileGroupFactory)
}),
+ PrepareForTestWithFilegroup,
+ PrepareForTestWithNamespace,
mockFS.AddToFixture(),
- ).RunTest(t)
+ OptionalFixturePreparer(test.preparer),
+ ).
+ ExtendWithErrorHandler(errorHandler).
+ RunTest(t)
m := result.ModuleForTests("foo", "").Module().(*pathForModuleSrcTestModule)
@@ -1333,6 +1348,73 @@
src: "foo/src_special/$",
rel: "src_special/$",
},
+ {
+ // This test makes sure that an unqualified module name cannot contain characters that make
+ // it appear as a qualified module name.
+ name: "output file provider, invalid fully qualified name",
+ bp: `
+ test {
+ name: "foo",
+ src: "://other:b",
+ srcs: ["://other:c"],
+ }`,
+ preparer: FixtureAddTextFile("other/Android.bp", `
+ soong_namespace {}
+
+ output_file_provider {
+ name: "b",
+ outs: ["gen/b"],
+ }
+
+ output_file_provider {
+ name: "c",
+ outs: ["gen/c"],
+ }
+ `),
+ src: "foo/:/other:b",
+ rel: ":/other:b",
+ srcs: []string{"foo/:/other:c"},
+ rels: []string{":/other:c"},
+ },
+ {
+ name: "output file provider, missing fully qualified name",
+ bp: `
+ test {
+ name: "foo",
+ src: "//other:b",
+ srcs: ["//other:c"],
+ }`,
+ errorHandler: FixtureExpectsAllErrorsToMatchAPattern([]string{
+ `"foo" depends on undefined module "//other:b"`,
+ `"foo" depends on undefined module "//other:c"`,
+ }),
+ },
+ {
+ name: "output file provider, fully qualified name",
+ bp: `
+ test {
+ name: "foo",
+ src: "//other:b",
+ srcs: ["//other:c"],
+ }`,
+ src: "out/soong/.intermediates/other/b/gen/b",
+ rel: "gen/b",
+ srcs: []string{"out/soong/.intermediates/other/c/gen/c"},
+ rels: []string{"gen/c"},
+ preparer: FixtureAddTextFile("other/Android.bp", `
+ soong_namespace {}
+
+ output_file_provider {
+ name: "b",
+ outs: ["gen/b"],
+ }
+
+ output_file_provider {
+ name: "c",
+ outs: ["gen/c"],
+ }
+ `),
+ },
}
testPathForModuleSrc(t, tests)
diff --git a/android/prebuilt.go b/android/prebuilt.go
index f3493bd..e611502 100644
--- a/android/prebuilt.go
+++ b/android/prebuilt.go
@@ -61,6 +61,16 @@
// a matching name.
Prefer *bool `android:"arch_variant"`
+ // When specified this names a Soong config variable that controls the prefer property.
+ //
+ // If the value of the named Soong config variable is true then prefer is set to false and vice
+ // versa. If the Soong config variable is not set then it defaults to false, so prefer defaults
+ // to true.
+ //
+ // If specified then the prefer property is ignored in favor of the value of the Soong config
+ // variable.
+ Use_source_config_var *ConfigVarProperties
+
SourceExists bool `blueprint:"mutated"`
UsePrebuilt bool `blueprint:"mutated"`
@@ -68,6 +78,22 @@
PrebuiltRenamedToSource bool `blueprint:"mutated"`
}
+// Properties that can be used to select a Soong config variable.
+type ConfigVarProperties struct {
+ // Allow instances of this struct to be used as a property value in a BpPropertySet.
+ BpPrintableBase
+
+ // The name of the configuration namespace.
+ //
+ // As passed to add_soong_config_namespace in Make.
+ Config_namespace *string
+
+ // The name of the configuration variable.
+ //
+ // As passed to add_soong_config_var_value in Make.
+ Var_name *string
+}
+
type Prebuilt struct {
properties PrebuiltProperties
@@ -364,12 +390,18 @@
return false
}
- // TODO: use p.Properties.Name and ctx.ModuleDir to override preference
- if Bool(p.properties.Prefer) {
+ // If source is not available or is disabled then always use the prebuilt.
+ if source == nil || !source.Enabled() {
return true
}
- return source == nil || !source.Enabled()
+ // If the use_source_config_var property is set then it overrides the prefer property setting.
+ if configVar := p.properties.Use_source_config_var; configVar != nil {
+ return !ctx.Config().VendorConfig(proptools.String(configVar.Config_namespace)).Bool(proptools.String(configVar.Var_name))
+ }
+
+ // TODO: use p.Properties.Name and ctx.ModuleDir to override preference
+ return Bool(p.properties.Prefer)
}
func (p *Prebuilt) SourceExists() bool {
diff --git a/android/prebuilt_test.go b/android/prebuilt_test.go
index 23524a5..dcd77ea 100644
--- a/android/prebuilt_test.go
+++ b/android/prebuilt_test.go
@@ -26,6 +26,7 @@
replaceBp bool // modules is added to default bp boilerplate if false.
modules string
prebuilt []OsType
+ preparer FixturePreparer
}{
{
name: "no prebuilt",
@@ -291,6 +292,86 @@
}`,
prebuilt: []OsType{Android, BuildOs},
},
+ {
+ name: "prebuilt use_source_config_var={acme, use_source} - no var specified",
+ modules: `
+ source {
+ name: "bar",
+ }
+
+ prebuilt {
+ name: "bar",
+ use_source_config_var: {config_namespace: "acme", var_name: "use_source"},
+ srcs: ["prebuilt_file"],
+ }`,
+ // When use_source_env is specified then it will use the prebuilt by default if the environment
+ // variable is not set.
+ prebuilt: []OsType{Android, BuildOs},
+ },
+ {
+ name: "prebuilt use_source_config_var={acme, use_source} - acme_use_source=false",
+ modules: `
+ source {
+ name: "bar",
+ }
+
+ prebuilt {
+ name: "bar",
+ use_source_config_var: {config_namespace: "acme", var_name: "use_source"},
+ srcs: ["prebuilt_file"],
+ }`,
+ preparer: FixtureModifyProductVariables(func(variables FixtureProductVariables) {
+ variables.VendorVars = map[string]map[string]string{
+ "acme": {
+ "use_source": "false",
+ },
+ }
+ }),
+ // Setting the environment variable named in use_source_env to false will cause the prebuilt to
+ // be used.
+ prebuilt: []OsType{Android, BuildOs},
+ },
+ {
+ name: "prebuilt use_source_config_var={acme, use_source} - acme_use_source=true",
+ modules: `
+ source {
+ name: "bar",
+ }
+
+ prebuilt {
+ name: "bar",
+ use_source_config_var: {config_namespace: "acme", var_name: "use_source"},
+ srcs: ["prebuilt_file"],
+ }`,
+ preparer: FixtureModifyProductVariables(func(variables FixtureProductVariables) {
+ variables.VendorVars = map[string]map[string]string{
+ "acme": {
+ "use_source": "true",
+ },
+ }
+ }),
+ // Setting the environment variable named in use_source_env to true will cause the source to be
+ // used.
+ prebuilt: nil,
+ },
+ {
+ name: "prebuilt use_source_config_var={acme, use_source} - acme_use_source=true, no source",
+ modules: `
+ prebuilt {
+ name: "bar",
+ use_source_config_var: {config_namespace: "acme", var_name: "use_source"},
+ srcs: ["prebuilt_file"],
+ }`,
+ preparer: FixtureModifyProductVariables(func(variables FixtureProductVariables) {
+ variables.VendorVars = map[string]map[string]string{
+ "acme": {
+ "use_source": "true",
+ },
+ }
+ }),
+ // Although the environment variable says to use source there is no source available.
+ prebuilt: []OsType{Android, BuildOs},
+ },
}
func TestPrebuilts(t *testing.T) {
@@ -329,6 +410,7 @@
}),
fs.AddToFixture(),
FixtureRegisterWithContext(registerTestPrebuiltModules),
+ OptionalFixturePreparer(test.preparer),
).RunTestWithBp(t, bp)
for _, variant := range result.ModuleVariantsForTests("foo") {
diff --git a/android/soong_config_modules_test.go b/android/soong_config_modules_test.go
index 8f252d9..b2f8eaa 100644
--- a/android/soong_config_modules_test.go
+++ b/android/soong_config_modules_test.go
@@ -313,6 +313,51 @@
})
}
+func TestNonExistentPropertyInSoongConfigModule(t *testing.T) {
+ bp := `
+ soong_config_module_type {
+ name: "acme_test",
+ module_type: "test",
+ config_namespace: "acme",
+ bool_variables: ["feature1"],
+ properties: ["made_up_property"],
+ }
+
+ acme_test {
+ name: "foo",
+ cflags: ["-DGENERIC"],
+ soong_config_variables: {
+ feature1: {
+ made_up_property: true,
+ },
+ },
+ }
+ `
+
+ fixtureForVendorVars := func(vars map[string]map[string]string) FixturePreparer {
+ return FixtureModifyProductVariables(func(variables FixtureProductVariables) {
+ variables.VendorVars = vars
+ })
+ }
+
+ GroupFixturePreparers(
+ fixtureForVendorVars(map[string]map[string]string{"acme": {"feature1": "1"}}),
+ PrepareForTestWithDefaults,
+ FixtureRegisterWithContext(func(ctx RegistrationContext) {
+ ctx.RegisterModuleType("soong_config_module_type_import", soongConfigModuleTypeImportFactory)
+ ctx.RegisterModuleType("soong_config_module_type", soongConfigModuleTypeFactory)
+ ctx.RegisterModuleType("soong_config_string_variable", soongConfigStringVariableDummyFactory)
+ ctx.RegisterModuleType("soong_config_bool_variable", soongConfigBoolVariableDummyFactory)
+ ctx.RegisterModuleType("test_defaults", soongConfigTestDefaultsModuleFactory)
+ ctx.RegisterModuleType("test", soongConfigTestModuleFactory)
+ }),
+ FixtureWithRootAndroidBp(bp),
+ ).ExtendWithErrorHandler(FixtureExpectsAllErrorsToMatchAPattern([]string{
+ // TODO(b/171232169): improve the error message for non-existent properties
+ `unrecognized property "soong_config_variables`,
+ })).RunTest(t)
+}
+
func testConfigWithVendorVars(buildDir, bp string, fs map[string][]byte, vendorVars map[string]map[string]string) Config {
config := TestConfig(buildDir, nil, bp, fs)
diff --git a/android/variable.go b/android/variable.go
index b6e168c..bbb9868 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -225,6 +225,7 @@
Allow_missing_dependencies *bool `json:",omitempty"`
Unbundled_build *bool `json:",omitempty"`
Unbundled_build_apps *bool `json:",omitempty"`
+ Unbundled_build_image *bool `json:",omitempty"`
Always_use_prebuilt_sdks *bool `json:",omitempty"`
Skip_boot_jars_check *bool `json:",omitempty"`
Malloc_not_svelte *bool `json:",omitempty"`
diff --git a/apex/apex_test.go b/apex/apex_test.go
index b5b1d44..422e46c 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -4687,16 +4687,26 @@
p := ctx.ModuleForTests(name, "android_common_myapex").Module().(java.UsesLibraryDependency)
dexJarBuildPath := p.DexJarBuildPath()
stem := android.RemoveOptionalPrebuiltPrefix(name)
- if expected, actual := ".intermediates/myapex.deapexer/android_common/deapexer/javalib/"+stem+".jar", android.NormalizePathForTesting(dexJarBuildPath); actual != expected {
- t.Errorf("Incorrect DexJarBuildPath value '%s', expected '%s'", actual, expected)
- }
+ android.AssertStringEquals(t, "DexJarBuildPath should be apex-related path.",
+ ".intermediates/myapex.deapexer/android_common/deapexer/javalib/"+stem+".jar",
+ android.NormalizePathForTesting(dexJarBuildPath))
+ }
+
+ checkDexJarInstallPath := func(t *testing.T, ctx *android.TestContext, name string) {
+ // Make sure the import has been given the correct path to the dex jar.
+ p := ctx.ModuleForTests(name, "android_common_myapex").Module().(java.UsesLibraryDependency)
+ dexJarBuildPath := p.DexJarInstallPath()
+ stem := android.RemoveOptionalPrebuiltPrefix(name)
+ android.AssertStringEquals(t, "DexJarInstallPath should be apex-related path.",
+ "target/product/test_device/apex/myapex/javalib/"+stem+".jar",
+ android.NormalizePathForTesting(dexJarBuildPath))
}
ensureNoSourceVariant := func(t *testing.T, ctx *android.TestContext, name string) {
// Make sure that an apex variant is not created for the source module.
- if expected, actual := []string{"android_common"}, ctx.ModuleVariantsForTests(name); !reflect.DeepEqual(expected, actual) {
- t.Errorf("invalid set of variants for %q: expected %q, found %q", "libfoo", expected, actual)
- }
+ android.AssertArrayString(t, "Check if there is no source variant",
+ []string{"android_common"},
+ ctx.ModuleVariantsForTests(name))
}
t.Run("prebuilt only", func(t *testing.T) {
@@ -4745,8 +4755,10 @@
}
checkDexJarBuildPath(t, ctx, "libfoo")
+ checkDexJarInstallPath(t, ctx, "libfoo")
checkDexJarBuildPath(t, ctx, "libbar")
+ checkDexJarInstallPath(t, ctx, "libbar")
})
t.Run("prebuilt with source preferred", func(t *testing.T) {
@@ -4792,9 +4804,11 @@
ctx := testDexpreoptWithApexes(t, bp, "", transform)
checkDexJarBuildPath(t, ctx, "prebuilt_libfoo")
+ checkDexJarInstallPath(t, ctx, "prebuilt_libfoo")
ensureNoSourceVariant(t, ctx, "libfoo")
checkDexJarBuildPath(t, ctx, "prebuilt_libbar")
+ checkDexJarInstallPath(t, ctx, "prebuilt_libbar")
ensureNoSourceVariant(t, ctx, "libbar")
})
@@ -4842,9 +4856,11 @@
ctx := testDexpreoptWithApexes(t, bp, "", transform)
checkDexJarBuildPath(t, ctx, "prebuilt_libfoo")
+ checkDexJarInstallPath(t, ctx, "prebuilt_libfoo")
ensureNoSourceVariant(t, ctx, "libfoo")
checkDexJarBuildPath(t, ctx, "prebuilt_libbar")
+ checkDexJarInstallPath(t, ctx, "prebuilt_libbar")
ensureNoSourceVariant(t, ctx, "libbar")
})
}
diff --git a/apex/platform_bootclasspath_test.go b/apex/platform_bootclasspath_test.go
index 279cf54..7209c02 100644
--- a/apex/platform_bootclasspath_test.go
+++ b/apex/platform_bootclasspath_test.go
@@ -398,6 +398,7 @@
name: "foo",
prefer: false,
shared_library: false,
+ permitted_packages: ["foo"],
public: {
jars: ["sdk_library/public/foo-stubs.jar"],
stub_srcs: ["sdk_library/public/foo_stub_sources"],
diff --git a/bazel/properties.go b/bazel/properties.go
index 0dd47da..7ecc92b 100644
--- a/bazel/properties.go
+++ b/bazel/properties.go
@@ -558,6 +558,19 @@
return len(lla.ConfigurableValues) > 0
}
+// IsEmpty returns true if the attribute has no values under any configuration.
+func (lla LabelListAttribute) IsEmpty() bool {
+ if len(lla.Value.Includes) > 0 {
+ return false
+ }
+ for axis, _ := range lla.ConfigurableValues {
+ if lla.ConfigurableValues[axis].HasConfigurableValues() {
+ return false
+ }
+ }
+ return true
+}
+
// ResolveExcludes handles excludes across the various axes, ensuring that items are removed from
// the base value and included in default values as appropriate.
func (lla *LabelListAttribute) ResolveExcludes() {
diff --git a/bp2build/cc_library_conversion_test.go b/bp2build/cc_library_conversion_test.go
index 285677a..4f720f5 100644
--- a/bp2build/cc_library_conversion_test.go
+++ b/bp2build/cc_library_conversion_test.go
@@ -674,6 +674,10 @@
blueprint: soongCcLibraryPreamble,
expectedBazelTargets: []string{`cc_library(
name = "a",
+ asflags = [
+ "-Ifoo/bar",
+ "-I$(BINDIR)/foo/bar",
+ ],
copts = [
"-Ifoo/bar",
"-I$(BINDIR)/foo/bar",
diff --git a/bp2build/cc_library_static_conversion_test.go b/bp2build/cc_library_static_conversion_test.go
index 40edec8..c33889f 100644
--- a/bp2build/cc_library_static_conversion_test.go
+++ b/bp2build/cc_library_static_conversion_test.go
@@ -1413,7 +1413,7 @@
func TestCcLibraryStaticProductVariableStringReplacement(t *testing.T) {
runCcLibraryStaticTestCase(t, bp2buildTestCase{
- description: "cc_library_static product variable selects",
+ description: "cc_library_static product variable string replacement",
moduleTypeUnderTest: "cc_library_static",
moduleTypeUnderTestFactory: cc.LibraryStaticFactory,
moduleTypeUnderTestBp2BuildMutator: cc.CcLibraryStaticBp2Build,
@@ -1422,7 +1422,7 @@
blueprint: soongCcLibraryStaticPreamble + `
cc_library_static {
name: "foo_static",
- srcs: ["common.c"],
+ srcs: ["common.S"],
product_variables: {
platform_sdk_version: {
asflags: ["-DPLATFORM_SDK_VERSION=%d"],
@@ -1431,7 +1431,10 @@
} `,
expectedBazelTargets: []string{`cc_library_static(
name = "foo_static",
- asflags = select({
+ asflags = [
+ "-I.",
+ "-I$(BINDIR)/.",
+ ] + select({
"//build/bazel/product_variables:platform_sdk_version": ["-DPLATFORM_SDK_VERSION=$(Platform_sdk_version)"],
"//conditions:default": [],
}),
@@ -1440,7 +1443,7 @@
"-I$(BINDIR)/.",
],
linkstatic = True,
- srcs_c = ["common.c"],
+ srcs_as = ["common.S"],
)`},
})
}
diff --git a/bp2build/cc_object_conversion_test.go b/bp2build/cc_object_conversion_test.go
index 8ede226..df4924b 100644
--- a/bp2build/cc_object_conversion_test.go
+++ b/bp2build/cc_object_conversion_test.go
@@ -211,6 +211,7 @@
asflags: ["-DPLATFORM_SDK_VERSION=%d"],
},
},
+ srcs: ["src.S"],
}
`,
expectedBazelTargets: []string{`cc_object(
@@ -220,6 +221,7 @@
"//conditions:default": [],
}),
copts = ["-fno-addrsig"],
+ srcs_as = ["src.S"],
)`,
},
})
@@ -240,7 +242,7 @@
cflags: ["-fPIC"], // string list
},
arm: {
- srcs: ["arch/arm/file.S"], // label list
+ srcs: ["arch/arm/file.cpp"], // label list
},
},
}
@@ -257,7 +259,7 @@
"//conditions:default": [],
}),
srcs = ["a.cpp"] + select({
- "//build/bazel/platforms/arch:arm": ["arch/arm/file.S"],
+ "//build/bazel/platforms/arch:arm": ["arch/arm/file.cpp"],
"//conditions:default": [],
}),
)`,
diff --git a/bpfix/bpfix/bpfix.go b/bpfix/bpfix/bpfix.go
index adb0a7b..a608630 100644
--- a/bpfix/bpfix/bpfix.go
+++ b/bpfix/bpfix/bpfix.go
@@ -136,6 +136,10 @@
Name: "removeScudoProperty",
Fix: runPatchListMod(removeObsoleteProperty("sanitize.scudo")),
},
+ {
+ Name: "formatFlagProperties",
+ Fix: runPatchListMod(formatFlagProperties),
+ },
}
func NewFixRequest() FixRequest {
@@ -1343,3 +1347,69 @@
}
return false
}
+
+func formatFlagProperty(mod *parser.Module, field string, buf []byte, patchlist *parser.PatchList) error {
+ // the comment or empty lines in the value of the field are skipped
+ listValue, ok := getLiteralListProperty(mod, field)
+ if !ok {
+ // if do not find
+ return nil
+ }
+ for i := 0; i < len(listValue.Values); i++ {
+ curValue, ok := listValue.Values[i].(*parser.String)
+ if !ok {
+ return fmt.Errorf("Expecting string for %s.%s fields", mod.Type, field)
+ }
+ if !strings.HasPrefix(curValue.Value, "-") {
+ return fmt.Errorf("Expecting the string `%s` starting with '-'", curValue.Value)
+ }
+ if i+1 < len(listValue.Values) {
+ nextValue, ok := listValue.Values[i+1].(*parser.String)
+ if !ok {
+ return fmt.Errorf("Expecting string for %s.%s fields", mod.Type, field)
+ }
+ if !strings.HasPrefix(nextValue.Value, "-") {
+ // delete the line
+ err := patchlist.Add(curValue.Pos().Offset, curValue.End().Offset+2, "")
+ if err != nil {
+ return err
+ }
+ // replace the line
+ value := "\"" + curValue.Value + " " + nextValue.Value + "\","
+ err = patchlist.Add(nextValue.Pos().Offset, nextValue.End().Offset+1, value)
+ if err != nil {
+ return err
+ }
+ // combined two lines to one
+ i++
+ }
+ }
+ }
+ return nil
+}
+
+func formatFlagProperties(mod *parser.Module, buf []byte, patchlist *parser.PatchList) error {
+ relevantFields := []string{
+ // cc flags
+ "asflags",
+ "cflags",
+ "clang_asflags",
+ "clang_cflags",
+ "conlyflags",
+ "cppflags",
+ "ldflags",
+ "tidy_flags",
+ // java flags
+ "aaptflags",
+ "dxflags",
+ "javacflags",
+ "kotlincflags",
+ }
+ for _, field := range relevantFields {
+ err := formatFlagProperty(mod, field, buf, patchlist)
+ if err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/bpfix/bpfix/bpfix_test.go b/bpfix/bpfix/bpfix_test.go
index b994e25..d8772c1 100644
--- a/bpfix/bpfix/bpfix_test.go
+++ b/bpfix/bpfix/bpfix_test.go
@@ -1336,3 +1336,275 @@
})
}
}
+
+func TestFormatFlagProperty(t *testing.T) {
+ tests := []struct {
+ name string
+ in string
+ out string
+ }{
+ {
+ name: "group options and values for apptflags, dxflags, javacflags, and kotlincflags",
+ in: `
+ android_test {
+ name: "foo",
+ aaptflags: [
+ // comment1_1
+ "--flag1",
+ // comment1_2
+ "1",
+ // comment2_1
+ // comment2_2
+ "--flag2",
+ // comment3_1
+ // comment3_2
+ // comment3_3
+ "--flag3",
+ // comment3_4
+ // comment3_5
+ // comment3_6
+ "3",
+ // other comment1_1
+ // other comment1_2
+ ],
+ dxflags: [
+ "--flag1",
+ // comment1_1
+ "1",
+ // comment2_1
+ "--flag2",
+ // comment3_1
+ "--flag3",
+ // comment3_2
+ "3",
+ ],
+ javacflags: [
+ "--flag1",
+
+ "1",
+ "--flag2",
+ "--flag3",
+ "3",
+ ],
+ kotlincflags: [
+
+ "--flag1",
+ "1",
+
+ "--flag2",
+ "--flag3",
+ "3",
+
+ ],
+ }
+ `,
+ out: `
+ android_test {
+ name: "foo",
+ aaptflags: [
+ // comment1_1
+ // comment1_2
+ "--flag1 1",
+ // comment2_1
+ // comment2_2
+ "--flag2",
+ // comment3_1
+ // comment3_2
+ // comment3_3
+ // comment3_4
+ // comment3_5
+ // comment3_6
+ "--flag3 3",
+ // other comment1_1
+ // other comment1_2
+ ],
+ dxflags: [
+ // comment1_1
+ "--flag1 1",
+ // comment2_1
+ "--flag2",
+ // comment3_1
+ // comment3_2
+ "--flag3 3",
+ ],
+ javacflags: [
+
+ "--flag1 1",
+ "--flag2",
+ "--flag3 3",
+ ],
+ kotlincflags: [
+
+ "--flag1 1",
+
+ "--flag2",
+ "--flag3 3",
+
+ ],
+ }
+ `,
+ },
+ {
+ name: "group options and values for asflags, cflags, clang_asflags, clang_cflags, conlyflags, cppflags, ldflags, and tidy_flags",
+ in: `
+ cc_test {
+ name: "foo",
+ asflags: [
+ // comment1_1
+ "--flag1",
+ "1",
+ // comment2_1
+ // comment2_2
+ "--flag2",
+ // comment2_3
+ "2",
+ // comment3_1
+ // comment3_2
+ "--flag3",
+ // comment3_3
+ // comment3_4
+ // comment3_4
+ "3",
+ // comment4_1
+ // comment4_2
+ // comment4_3
+ "--flag4",
+ ],
+ cflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ clang_asflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ clang_cflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ conlyflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ cppflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ ldflags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ tidy_flags: [
+ "--flag1",
+ "1",
+ "--flag2",
+ "2",
+ "--flag3",
+ "3",
+ "--flag4",
+ ],
+ }
+ `,
+ out: `
+ cc_test {
+ name: "foo",
+ asflags: [
+ // comment1_1
+ "--flag1 1",
+ // comment2_1
+ // comment2_2
+ // comment2_3
+ "--flag2 2",
+ // comment3_1
+ // comment3_2
+ // comment3_3
+ // comment3_4
+ // comment3_4
+ "--flag3 3",
+ // comment4_1
+ // comment4_2
+ // comment4_3
+ "--flag4",
+ ],
+ cflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ clang_asflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ clang_cflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ conlyflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ cppflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ ldflags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ tidy_flags: [
+ "--flag1 1",
+ "--flag2 2",
+ "--flag3 3",
+ "--flag4",
+ ],
+ }
+ `,
+ },
+ }
+ for _, test := range tests {
+ t.Run(test.name, func(t *testing.T) {
+ runPass(t, test.in, test.out, runPatchListMod(formatFlagProperties))
+ })
+ }
+}
diff --git a/cc/bp2build.go b/cc/bp2build.go
index 76c5f3b..536f112 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -90,8 +90,11 @@
// TODO(b/186024507, b/186489250): Temporarily exclude adding
// system_shared_libs deps until libc and libm builds.
- // allDeps = append(allDeps, lib.SharedProperties.Shared.System_shared_libs...)
- // allDeps = append(allDeps, lib.StaticProperties.Static.System_shared_libs...)
+ if lib.static() {
+ allDeps = append(allDeps, lib.StaticProperties.Static.System_shared_libs...)
+ } else if lib.shared() {
+ allDeps = append(allDeps, lib.SharedProperties.Shared.System_shared_libs...)
+ }
// Deps in the target/arch nested static: { .. } and shared: { .. } props of a cc_library.
// target: { <target>: shared: { ... } }
@@ -253,7 +256,7 @@
Copts: bazel.StringListAttribute{Value: props.Cflags},
Srcs: bazel.MakeLabelListAttribute(android.BazelLabelForModuleSrc(ctx, props.Srcs)),
Static_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, props.Static_libs)),
- Dynamic_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, props.Shared_libs)),
+ Dynamic_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, append(props.Shared_libs, props.System_shared_libs...))),
Whole_archive_deps: bazel.MakeLabelListAttribute(android.BazelLabelForModuleWholeDeps(ctx, props.Whole_static_libs)),
}
@@ -385,16 +388,6 @@
return result
}
- // Parse the list of copts.
- parseCopts := func(baseCompilerProps *BaseCompilerProperties) []string {
- var copts []string
- copts = append(copts, parseCommandLineFlags(baseCompilerProps.Cflags)...)
- for _, dir := range parseLocalIncludeDirs(baseCompilerProps) {
- copts = append(copts, includeFlags(dir)...)
- }
- return copts
- }
-
// Parse srcs from an arch or OS's props value.
parseSrcs := func(baseCompilerProps *BaseCompilerProperties) bazel.LabelList {
// Add srcs-like dependencies such as generated files.
@@ -410,11 +403,15 @@
for _, props := range module.compiler.compilerProps() {
if baseCompilerProps, ok := props.(*BaseCompilerProperties); ok {
srcs.SetValue(parseSrcs(baseCompilerProps))
- copts.Value = parseCopts(baseCompilerProps)
+ copts.Value = parseCommandLineFlags(baseCompilerProps.Cflags)
asFlags.Value = parseCommandLineFlags(baseCompilerProps.Asflags)
conlyFlags.Value = parseCommandLineFlags(baseCompilerProps.Conlyflags)
cppFlags.Value = parseCommandLineFlags(baseCompilerProps.Cppflags)
+ for _, dir := range parseLocalIncludeDirs(baseCompilerProps) {
+ copts.Value = append(copts.Value, includeFlags(dir)...)
+ asFlags.Value = append(asFlags.Value, includeFlags(dir)...)
+ }
break
}
}
@@ -424,8 +421,10 @@
// "-I<module-dir>" in its copts.
if c, ok := module.compiler.(*baseCompiler); ok && c.includeBuildDirectory() {
copts.Value = append(copts.Value, includeFlags(".")...)
+ asFlags.Value = append(asFlags.Value, includeFlags(".")...)
} else if c, ok := module.compiler.(*libraryDecorator); ok && c.includeBuildDirectory() {
copts.Value = append(copts.Value, includeFlags(".")...)
+ asFlags.Value = append(asFlags.Value, includeFlags(".")...)
}
archVariantCompilerProps := module.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
@@ -440,8 +439,15 @@
srcs.SetSelectValue(axis, config, srcsList)
}
- copts.SetSelectValue(axis, config, parseCopts(baseCompilerProps))
- asFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Asflags))
+ archVariantCopts := parseCommandLineFlags(baseCompilerProps.Cflags)
+ archVariantAsflags := parseCommandLineFlags(baseCompilerProps.Asflags)
+ for _, dir := range parseLocalIncludeDirs(baseCompilerProps) {
+ archVariantCopts = append(archVariantCopts, includeFlags(dir)...)
+ archVariantAsflags = append(archVariantAsflags, includeFlags(dir)...)
+ }
+
+ copts.SetSelectValue(axis, config, archVariantCopts)
+ asFlags.SetSelectValue(axis, config, archVariantAsflags)
conlyFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Conlyflags))
cppFlags.SetSelectValue(axis, config, parseCommandLineFlags(baseCompilerProps.Cppflags))
}
@@ -554,7 +560,9 @@
staticDeps.Value = android.BazelLabelForModuleDepsExcludes(ctx, staticLibs, baseLinkerProps.Exclude_static_libs)
wholeArchiveLibs := android.FirstUniqueStrings(baseLinkerProps.Whole_static_libs)
wholeArchiveDeps = bazel.MakeLabelListAttribute(android.BazelLabelForModuleWholeDepsExcludes(ctx, wholeArchiveLibs, baseLinkerProps.Exclude_static_libs))
- sharedLibs := android.FirstUniqueStrings(baseLinkerProps.Shared_libs)
+ // TODO(b/186024507): Handle system_shared_libs as its own attribute, so that the appropriate default
+ // may be supported.
+ sharedLibs := android.FirstUniqueStrings(append(baseLinkerProps.Shared_libs, baseLinkerProps.System_shared_libs...))
dynamicDeps = bazel.MakeLabelListAttribute(android.BazelLabelForModuleDepsExcludes(ctx, sharedLibs, baseLinkerProps.Exclude_shared_libs))
headerLibs := android.FirstUniqueStrings(baseLinkerProps.Header_libs)
@@ -581,7 +589,7 @@
staticDeps.SetSelectValue(axis, config, android.BazelLabelForModuleDepsExcludes(ctx, staticLibs, baseLinkerProps.Exclude_static_libs))
wholeArchiveLibs := android.FirstUniqueStrings(baseLinkerProps.Whole_static_libs)
wholeArchiveDeps.SetSelectValue(axis, config, android.BazelLabelForModuleWholeDepsExcludes(ctx, wholeArchiveLibs, baseLinkerProps.Exclude_static_libs))
- sharedLibs := android.FirstUniqueStrings(baseLinkerProps.Shared_libs)
+ sharedLibs := android.FirstUniqueStrings(append(baseLinkerProps.Shared_libs, baseLinkerProps.System_shared_libs...))
dynamicDeps.SetSelectValue(axis, config, android.BazelLabelForModuleDepsExcludes(ctx, sharedLibs, baseLinkerProps.Exclude_shared_libs))
headerLibs := android.FirstUniqueStrings(baseLinkerProps.Header_libs)
diff --git a/cc/cc.go b/cc/cc.go
index 90c0237..aeebaef 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2014,9 +2014,9 @@
}
func GetSnapshot(c LinkableInterface, snapshotInfo **SnapshotInfo, actx android.BottomUpMutatorContext) SnapshotInfo {
- // Only modules with BOARD_VNDK_VERSION uses snapshot. Others use the zero value of
+ // Only device modules with BOARD_VNDK_VERSION uses snapshot. Others use the zero value of
// SnapshotInfo, which provides no mappings.
- if *snapshotInfo == nil {
+ if *snapshotInfo == nil && c.Device() {
// Only retrieve the snapshot on demand in order to avoid circular dependencies
// between the modules in the snapshot and the snapshot itself.
var snapshotModule []blueprint.Module
@@ -2025,16 +2025,16 @@
} else if recoverySnapshotVersion := actx.DeviceConfig().RecoverySnapshotVersion(); recoverySnapshotVersion != "current" && recoverySnapshotVersion != "" && c.InRecovery() {
snapshotModule = actx.AddVariationDependencies(nil, nil, "recovery_snapshot")
}
- if len(snapshotModule) > 0 {
+ if len(snapshotModule) > 0 && snapshotModule[0] != nil {
snapshot := actx.OtherModuleProvider(snapshotModule[0], SnapshotInfoProvider).(SnapshotInfo)
*snapshotInfo = &snapshot
// republish the snapshot for use in later mutators on this module
actx.SetProvider(SnapshotInfoProvider, snapshot)
- } else {
- *snapshotInfo = &SnapshotInfo{}
}
}
-
+ if *snapshotInfo == nil {
+ *snapshotInfo = &SnapshotInfo{}
+ }
return **snapshotInfo
}
diff --git a/cc/library.go b/cc/library.go
index 4fd7c74..56c460c 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -300,6 +300,12 @@
srcs := compilerAttrs.srcs
+ asFlags := compilerAttrs.asFlags
+ if compilerAttrs.asSrcs.IsEmpty() && sharedAttrs.Srcs_as.IsEmpty() && staticAttrs.Srcs_as.IsEmpty() {
+ // Skip asflags for BUILD file simplicity if there are no assembly sources.
+ asFlags = bazel.MakeStringListAttribute(nil)
+ }
+
attrs := &bazelCcLibraryAttributes{
Srcs: srcs,
Srcs_c: compilerAttrs.cSrcs,
@@ -308,7 +314,7 @@
Copts: compilerAttrs.copts,
Cppflags: compilerAttrs.cppFlags,
Conlyflags: compilerAttrs.conlyFlags,
- Asflags: compilerAttrs.asFlags,
+ Asflags: asFlags,
Implementation_deps: linkerAttrs.deps,
Deps: linkerAttrs.exportedDeps,
@@ -2370,6 +2376,12 @@
linkerAttrs := bp2BuildParseLinkerProps(ctx, module)
exportedIncludes := bp2BuildParseExportedIncludes(ctx, module)
+ asFlags := compilerAttrs.asFlags
+ if compilerAttrs.asSrcs.IsEmpty() {
+ // Skip asflags for BUILD file simplicity if there are no assembly sources.
+ asFlags = bazel.MakeStringListAttribute(nil)
+ }
+
attrs := &bazelCcLibraryStaticAttributes{
Copts: compilerAttrs.copts,
Srcs: compilerAttrs.srcs,
@@ -2386,7 +2398,7 @@
Srcs_c: compilerAttrs.cSrcs,
Conlyflags: compilerAttrs.conlyFlags,
Srcs_as: compilerAttrs.asSrcs,
- Asflags: compilerAttrs.asFlags,
+ Asflags: asFlags,
}
props := bazel.BazelTargetModuleProperties{
diff --git a/cc/linkable.go b/cc/linkable.go
index 84141e2..6232efb 100644
--- a/cc/linkable.go
+++ b/cc/linkable.go
@@ -125,6 +125,7 @@
IsPrebuilt() bool
Toc() android.OptionalPath
+ Device() bool
Host() bool
InRamdisk() bool
diff --git a/cc/object.go b/cc/object.go
index ac5e41d..0f983c8 100644
--- a/cc/object.go
+++ b/cc/object.go
@@ -123,6 +123,7 @@
// For bp2build conversion.
type bazelObjectAttributes struct {
Srcs bazel.LabelListAttribute
+ Srcs_as bazel.LabelListAttribute
Hdrs bazel.LabelListAttribute
Deps bazel.LabelListAttribute
Copts bazel.StringListAttribute
@@ -179,13 +180,19 @@
// and this isn't typically done for cc_object.
srcs := compilerAttrs.srcs
srcs.Append(compilerAttrs.cSrcs)
- srcs.Append(compilerAttrs.asSrcs)
+
+ asFlags := compilerAttrs.asFlags
+ if compilerAttrs.asSrcs.IsEmpty() {
+ // Skip asflags for BUILD file simplicity if there are no assembly sources.
+ asFlags = bazel.MakeStringListAttribute(nil)
+ }
attrs := &bazelObjectAttributes{
Srcs: srcs,
+ Srcs_as: compilerAttrs.asSrcs,
Deps: deps,
Copts: compilerAttrs.copts,
- Asflags: compilerAttrs.asFlags,
+ Asflags: asFlags,
}
props := bazel.BazelTargetModuleProperties{
diff --git a/cc/snapshot_prebuilt.go b/cc/snapshot_prebuilt.go
index fb89224..4f031ff 100644
--- a/cc/snapshot_prebuilt.go
+++ b/cc/snapshot_prebuilt.go
@@ -264,6 +264,7 @@
func init() {
VendorSnapshotImageSingleton.Init(android.InitRegistrationContext)
recoverySnapshotImageSingleton.init(android.InitRegistrationContext)
+ android.RegisterMakeVarsProvider(pctx, snapshotMakeVarsProvider)
}
const (
@@ -383,6 +384,24 @@
var _ android.ImageInterface = (*snapshot)(nil)
+func snapshotMakeVarsProvider(ctx android.MakeVarsContext) {
+ snapshotSet := map[string]struct{}{}
+ ctx.VisitAllModules(func(m android.Module) {
+ if s, ok := m.(*snapshot); ok {
+ if _, ok := snapshotSet[s.Name()]; ok {
+ // arch variant generates duplicated modules
+ // skip this as we only need to know the path of the module.
+ return
+ }
+ snapshotSet[s.Name()] = struct{}{}
+ imageNameVersion := strings.Split(s.image.imageVariantName(ctx.DeviceConfig()), ".")
+ ctx.Strict(
+ strings.Join([]string{strings.ToUpper(imageNameVersion[0]), s.baseSnapshot.Version(), "SNAPSHOT_DIR"}, "_"),
+ ctx.ModuleDir(s))
+ }
+ })
+}
+
func vendorSnapshotFactory() android.Module {
return snapshotFactory(VendorSnapshotImageSingleton)
}
diff --git a/dexpreopt/class_loader_context.go b/dexpreopt/class_loader_context.go
index f76a205..94b9adf 100644
--- a/dexpreopt/class_loader_context.go
+++ b/dexpreopt/class_loader_context.go
@@ -15,6 +15,7 @@
package dexpreopt
import (
+ "encoding/json"
"fmt"
"sort"
"strconv"
@@ -257,6 +258,9 @@
func (clcMap ClassLoaderContextMap) addContext(ctx android.ModuleInstallPathContext, sdkVer int, lib string,
hostPath, installPath android.Path, nestedClcMap ClassLoaderContextMap) error {
+ // For prebuilts, library should have the same name as the source module.
+ lib = android.RemoveOptionalPrebuiltPrefix(lib)
+
devicePath := UnknownInstallLibraryPath
if installPath == nil {
if android.InList(lib, CompatUsesLibs) || android.InList(lib, OptionalCompatUsesLibs) {
@@ -360,6 +364,15 @@
return ulibs
}
+func (clcMap ClassLoaderContextMap) Dump() string {
+ jsonCLC := toJsonClassLoaderContext(clcMap)
+ bytes, err := json.MarshalIndent(jsonCLC, "", " ")
+ if err != nil {
+ panic(err)
+ }
+ return string(bytes)
+}
+
// Now that the full unconditional context is known, reconstruct conditional context.
// Apply filters for individual libraries, mirroring what the PackageManager does when it
// constructs class loader context on device.
diff --git a/java/app.go b/java/app.go
index fc1ace0..fc6e183 100755
--- a/java/app.go
+++ b/java/app.go
@@ -1213,7 +1213,7 @@
}
func (u *usesLibrary) deps(ctx android.BottomUpMutatorContext, hasFrameworkLibs bool) {
- if !ctx.Config().UnbundledBuild() {
+ if !ctx.Config().UnbundledBuild() || ctx.Config().UnbundledBuildImage() {
ctx.AddVariationDependencies(nil, usesLibTag, u.usesLibraryProperties.Uses_libs...)
ctx.AddVariationDependencies(nil, usesLibTag, u.presentOptionalUsesLibs(ctx)...)
// Only add these extra dependencies if the module depends on framework libs. This avoids
@@ -1249,15 +1249,16 @@
// to their dex jars on host and on device.
func (u *usesLibrary) classLoaderContextForUsesLibDeps(ctx android.ModuleContext) dexpreopt.ClassLoaderContextMap {
clcMap := make(dexpreopt.ClassLoaderContextMap)
-
- if !ctx.Config().UnbundledBuild() {
+ // Skip when UnbundledBuild() is true, but UnbundledBuildImage() is false.
+ // Added UnbundledBuildImage() condition to generate dexpreopt.config even though unbundled image is built.
+ if !ctx.Config().UnbundledBuild() || ctx.Config().UnbundledBuildImage() {
ctx.VisitDirectDeps(func(m android.Module) {
if tag, ok := ctx.OtherModuleDependencyTag(m).(usesLibraryDependencyTag); ok {
dep := ctx.OtherModuleName(m)
if lib, ok := m.(UsesLibraryDependency); ok {
- libName := dep
+ libName := android.RemoveOptionalPrebuiltPrefix(dep)
if ulib, ok := m.(ProvidesUsesLib); ok && ulib.ProvidesUsesLib() != nil {
- libName = *ulib.ProvidesUsesLib()
+ libName = android.RemoveOptionalPrebuiltPrefix(*ulib.ProvidesUsesLib())
// Replace module name with library name in `uses_libs`/`optional_uses_libs`
// in order to pass verify_uses_libraries check (which compares these
// properties against library names written in the manifest).
diff --git a/java/dexpreopt.go b/java/dexpreopt.go
index 2e46d74..0faae36 100644
--- a/java/dexpreopt.go
+++ b/java/dexpreopt.go
@@ -141,10 +141,9 @@
}
}
- // If it is neither app nor test, make config files regardless of its dexpreopt setting.
+ // If it is test, make config files regardless of its dexpreopt setting.
// The config files are required for apps defined in make which depend on the lib.
- // TODO(b/158843648): The config for apps should be generated as well regardless of setting.
- if (d.isApp || d.isTest) && d.dexpreoptDisabled(ctx) {
+ if d.isTest && d.dexpreoptDisabled(ctx) {
return
}
diff --git a/java/dexpreopt_bootjars.go b/java/dexpreopt_bootjars.go
index 19c65ca..dff9543 100644
--- a/java/dexpreopt_bootjars.go
+++ b/java/dexpreopt_bootjars.go
@@ -154,12 +154,23 @@
// PRODUCT_BOOT_JARS_EXTRA variables. The AOSP makefiles specify some common Framework libraries,
// but more product-specific libraries can be added in the product makefiles.
//
-// Each component of the PRODUCT_BOOT_JARS and PRODUCT_BOOT_JARS_EXTRA variables is either a simple
-// name (if the library is a part of the Platform), or a colon-separated pair <apex, name> (if the
-// library is a part of a non-updatable APEX).
+// Each component of the PRODUCT_BOOT_JARS and PRODUCT_BOOT_JARS_EXTRA variables is a
+// colon-separated pair <apex>:<library>, where <apex> is the variant name of a non-updatable APEX,
+// "platform" if the library is a part of the platform in the system partition, or "system_ext" if
+// it's in the system_ext partition.
+//
+// In these variables APEXes are identified by their "variant names", i.e. the names they get
+// mounted as in /apex on device. In Soong modules that is the name set in the "apex_name"
+// properties, which default to the "name" values. For example, many APEXes have both
+// com.android.xxx and com.google.android.xxx modules in Soong, but take the same place
+// /apex/com.android.xxx at runtime. In these cases the variant name is always com.android.xxx,
+// regardless which APEX goes into the product. See also android.ApexInfo.ApexVariationName and
+// apex.apexBundleProperties.Apex_name.
//
// A related variable PRODUCT_UPDATABLE_BOOT_JARS contains bootclasspath libraries that are in
-// updatable APEXes. They are not included in the boot image.
+// APEXes. They are not included in the boot image. The only exception here is core-icu4j.jar that
+// has been historically part of the boot image and is now in a non updatable apex; it is treated
+// as being part of PRODUCT_BOOT_JARS and is in the boot image.
//
// One exception to the above rules are "coverage" builds (a special build flavor which requires
// setting environment variable EMMA_INSTRUMENT_FRAMEWORK=true). In coverage builds the Java code in
diff --git a/java/java.go b/java/java.go
index be1ad87..bd059b5 100644
--- a/java/java.go
+++ b/java/java.go
@@ -21,7 +21,6 @@
import (
"fmt"
"path/filepath"
- "strings"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
@@ -581,6 +580,10 @@
JarToExport android.Path `android:"arch_variant"`
AidlIncludeDirs android.Paths
+
+ // The list of permitted packages that need to be passed to the prebuilts as they are used to
+ // create the updatable-bcp-packages.txt file.
+ PermittedPackages []string
}
func (p *librarySdkMemberProperties) PopulateFromVariant(ctx android.SdkMemberContext, variant android.Module) {
@@ -589,6 +592,8 @@
p.JarToExport = ctx.MemberType().(*librarySdkMemberType).jarToExportGetter(ctx, j)
p.AidlIncludeDirs = j.AidlIncludeDirs()
+
+ p.PermittedPackages = j.PermittedPackagesForUpdatableBootJars()
}
func (p *librarySdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) {
@@ -607,6 +612,10 @@
propertySet.AddProperty("jars", []string{snapshotRelativeJavaLibPath})
}
+ if len(p.PermittedPackages) > 0 {
+ propertySet.AddProperty("permitted_packages", p.PermittedPackages)
+ }
+
// Do not copy anything else to the snapshot.
if memberType.onlyCopyJarToSnapshot {
return
@@ -1127,6 +1136,10 @@
Installable *bool
+ // If not empty, classes are restricted to the specified packages and their sub-packages.
+ // This information is used to generate the updatable-bcp-packages.txt file.
+ Permitted_packages []string
+
// List of shared java libs that this module has dependencies to
Libs []string
@@ -1166,7 +1179,8 @@
properties ImportProperties
// output file containing classes.dex and resources
- dexJarFile android.Path
+ dexJarFile android.Path
+ dexJarInstallFile android.Path
combinedClasspathFile android.Path
classLoaderContexts dexpreopt.ClassLoaderContextMap
@@ -1178,6 +1192,12 @@
minSdkVersion android.SdkSpec
}
+var _ PermittedPackagesForUpdatableBootJars = (*Import)(nil)
+
+func (j *Import) PermittedPackagesForUpdatableBootJars() []string {
+ return j.properties.Permitted_packages
+}
+
func (j *Import) SdkVersion(ctx android.EarlyModuleContext) android.SdkSpec {
return android.SdkSpecFrom(ctx, String(j.properties.Sdk_version))
}
@@ -1311,6 +1331,7 @@
di := ctx.OtherModuleProvider(deapexerModule, android.DeapexerProvider).(android.DeapexerInfo)
if dexOutputPath := di.PrebuiltExportPath(apexRootRelativePathToJavaLib(j.BaseModuleName())); dexOutputPath != nil {
j.dexJarFile = dexOutputPath
+ j.dexJarInstallFile = android.PathForModuleInPartitionInstall(ctx, "apex", ai.ApexVariationName, apexRootRelativePathToJavaLib(j.BaseModuleName()))
// Initialize the hiddenapi structure.
j.initHiddenAPI(ctx, dexOutputPath, outputFile, nil)
@@ -1351,6 +1372,7 @@
dexOutputFile = j.hiddenAPIEncodeDex(ctx, dexOutputFile)
j.dexJarFile = dexOutputFile
+ j.dexJarInstallFile = android.PathForModuleInstall(ctx, "framework", jarName)
}
}
@@ -1392,7 +1414,7 @@
}
func (j *Import) DexJarInstallPath() android.Path {
- return nil
+ return j.dexJarInstallFile
}
func (j *Import) ClassLoaderContexts() dexpreopt.ClassLoaderContextMap {
@@ -1462,11 +1484,7 @@
// TODO(b/113562217): Extract the base module name from the Import name, often the Import name
// has a prefix "prebuilt_". Remove the prefix explicitly if needed until we find a better
// solution to get the Import name.
- name := j.Name()
- if strings.HasPrefix(name, removedPrefix) {
- name = strings.TrimPrefix(name, removedPrefix)
- }
- return name
+ return android.RemoveOptionalPrebuiltPrefix(j.Name())
}
var _ android.PrebuiltInterface = (*Import)(nil)
diff --git a/java/lint.go b/java/lint.go
index dd5e4fb..fe3218e 100644
--- a/java/lint.go
+++ b/java/lint.go
@@ -391,8 +391,9 @@
rule.Command().Text("rm -f").Output(html).Output(text).Output(xml)
var apiVersionsName, apiVersionsPrebuilt string
- if l.compileSdkKind == android.SdkModule {
- // When compiling an SDK module we use the filtered database because otherwise lint's
+ if l.compileSdkKind == android.SdkModule || l.compileSdkKind == android.SdkSystemServer {
+ // When compiling an SDK module (or system server) we use the filtered
+ // database because otherwise lint's
// NewApi check produces too many false positives; This database excludes information
// about classes created in mainline modules hence removing those false positives.
apiVersionsName = "api_versions_public_filtered.xml"
diff --git a/java/lint_test.go b/java/lint_test.go
index 9cf1c33..456e6ba 100644
--- a/java/lint_test.go
+++ b/java/lint_test.go
@@ -261,6 +261,9 @@
}
func TestJavaLintDatabaseSelectionPublicFiltered(t *testing.T) {
+ testCases := []string{
+ "module_current", "system_server_current",
+ }
bp := `
java_library {
name: "foo",
@@ -274,17 +277,20 @@
},
}
`
- result := android.GroupFixturePreparers(PrepareForTestWithJavaDefaultModules).
- RunTestWithBp(t, bp)
+ for _, testCase := range testCases {
+ thisBp := strings.Replace(bp, "XXX", testCase, 1)
+ result := android.GroupFixturePreparers(PrepareForTestWithJavaDefaultModules).
+ RunTestWithBp(t, thisBp)
- foo := result.ModuleForTests("foo", "android_common")
- sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
- if !strings.Contains(*sboxProto.Commands[0].Command,
- "/api_versions_public_filtered.xml") {
- t.Error("did not use public-filtered lint api database", *sboxProto.Commands[0].Command)
- }
- if strings.Contains(*sboxProto.Commands[0].Command,
- "/api_versions.xml") {
- t.Error("used full api database")
+ foo := result.ModuleForTests("foo", "android_common")
+ sboxProto := android.RuleBuilderSboxProtoForTests(t, foo.Output("lint.sbox.textproto"))
+ if !strings.Contains(*sboxProto.Commands[0].Command,
+ "/api_versions_public_filtered.xml") {
+ t.Error("did not use public-filtered lint api database for case", testCase)
+ }
+ if strings.Contains(*sboxProto.Commands[0].Command,
+ "/api_versions.xml") {
+ t.Error("used full api database for case", testCase)
+ }
}
}
diff --git a/java/robolectric.go b/java/robolectric.go
index 00f233e..a37a118 100644
--- a/java/robolectric.go
+++ b/java/robolectric.go
@@ -179,7 +179,7 @@
continue
} else if strings.HasSuffix(s, "/BaseRobolectricTest.java") {
continue
- } else if strings.HasPrefix(s, "src/") {
+ } else {
s = strings.TrimPrefix(s, "src/")
}
r.tests = append(r.tests, s)
diff --git a/java/sdk_library.go b/java/sdk_library.go
index ed9aeff..d1b4a47 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -1897,6 +1897,10 @@
// If set to true, compile dex files for the stubs. Defaults to false.
Compile_dex *bool
+
+ // If not empty, classes are restricted to the specified packages and their sub-packages.
+ // This information is used to generate the updatable-bcp-packages.txt file.
+ Permitted_packages []string
}
type SdkLibraryImport struct {
@@ -1923,8 +1927,12 @@
// Is nil if the source module does not exist.
xmlPermissionsFileModule *sdkLibraryXml
- // Path to the dex implementation jar obtained from the prebuilt_apex, if any.
+ // Build path to the dex implementation jar obtained from the prebuilt_apex, if any.
dexJarFile android.Path
+
+ // Expected install file path of the source module(sdk_library)
+ // or dex implementation jar obtained from the prebuilt_apex, if any.
+ installFile android.Path
}
var _ SdkLibraryDependency = (*SdkLibraryImport)(nil)
@@ -1991,6 +1999,12 @@
return module
}
+var _ PermittedPackagesForUpdatableBootJars = (*SdkLibraryImport)(nil)
+
+func (module *SdkLibraryImport) PermittedPackagesForUpdatableBootJars() []string {
+ return module.properties.Permitted_packages
+}
+
func (module *SdkLibraryImport) Prebuilt() *android.Prebuilt {
return &module.prebuilt
}
@@ -2136,6 +2150,9 @@
var deapexerModule android.Module
+ // Assume that source module(sdk_library) is installed in /<sdk_library partition>/framework
+ module.installFile = android.PathForModuleInstall(ctx, "framework", module.Stem()+".jar")
+
// Record the paths to the prebuilt stubs library and stubs source.
ctx.VisitDirectDeps(func(to android.Module) {
tag := ctx.OtherModuleDependencyTag(to)
@@ -2195,6 +2212,7 @@
di := ctx.OtherModuleProvider(deapexerModule, android.DeapexerProvider).(android.DeapexerInfo)
if dexOutputPath := di.PrebuiltExportPath(apexRootRelativePathToJavaLib(module.BaseModuleName())); dexOutputPath != nil {
module.dexJarFile = dexOutputPath
+ module.installFile = android.PathForModuleInPartitionInstall(ctx, "apex", ai.ApexVariationName, apexRootRelativePathToJavaLib(module.BaseModuleName()))
module.initHiddenAPI(ctx, dexOutputPath, module.findScopePaths(apiScopePublic).stubsImplPath[0], nil)
} else {
// This should never happen as a variant for a prebuilt_apex is only created if the
@@ -2249,11 +2267,7 @@
// to satisfy UsesLibraryDependency interface
func (module *SdkLibraryImport) DexJarInstallPath() android.Path {
- if module.implLibraryModule == nil {
- return nil
- } else {
- return module.implLibraryModule.DexJarInstallPath()
- }
+ return module.installFile
}
// to satisfy UsesLibraryDependency interface
@@ -2506,6 +2520,8 @@
// The paths to the doctag files to add to the prebuilt.
Doctag_paths android.Paths
+
+ Permitted_packages []string
}
type scopeProperties struct {
@@ -2546,6 +2562,7 @@
s.Shared_library = proptools.BoolPtr(sdk.sharedLibrary())
s.Compile_dex = sdk.dexProperties.Compile_dex
s.Doctag_paths = sdk.doctagPaths
+ s.Permitted_packages = sdk.PermittedPackagesForUpdatableBootJars()
}
func (s *sdkLibrarySdkMemberProperties) AddToPropertySet(ctx android.SdkMemberContext, propertySet android.BpPropertySet) {
@@ -2558,6 +2575,9 @@
if s.Compile_dex != nil {
propertySet.AddProperty("compile_dex", *s.Compile_dex)
}
+ if len(s.Permitted_packages) > 0 {
+ propertySet.AddProperty("permitted_packages", s.Permitted_packages)
+ }
for _, apiScope := range allApiScopes {
if properties, ok := s.Scopes[apiScope]; ok {
diff --git a/sdk/bootclasspath_fragment_sdk_test.go b/sdk/bootclasspath_fragment_sdk_test.go
index a458cba..1d2ab42 100644
--- a/sdk/bootclasspath_fragment_sdk_test.go
+++ b/sdk/bootclasspath_fragment_sdk_test.go
@@ -327,6 +327,7 @@
visibility: ["//visibility:public"],
apex_available: ["myapex"],
jars: ["java/mybootlib.jar"],
+ permitted_packages: ["mybootlib"],
}
java_sdk_library_import {
@@ -336,6 +337,7 @@
apex_available: ["myapex"],
shared_library: true,
compile_dex: true,
+ permitted_packages: ["myothersdklibrary"],
public: {
jars: ["sdk_library/public/myothersdklibrary-stubs.jar"],
stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"],
@@ -409,6 +411,7 @@
visibility: ["//visibility:public"],
apex_available: ["myapex"],
jars: ["java/mybootlib.jar"],
+ permitted_packages: ["mybootlib"],
}
java_sdk_library_import {
@@ -418,6 +421,7 @@
apex_available: ["myapex"],
shared_library: true,
compile_dex: true,
+ permitted_packages: ["myothersdklibrary"],
public: {
jars: ["sdk_library/public/myothersdklibrary-stubs.jar"],
stub_srcs: ["sdk_library/public/myothersdklibrary_stub_sources"],
@@ -509,6 +513,12 @@
out/soong/.intermediates/frameworks/base/boot/platform-bootclasspath/android_common/hiddenapi-monolithic/index-from-classes.csv
snapshot/hiddenapi/index.csv
`, rule)
+
+ // Make sure that the permitted packages from the prebuilts end up in the
+ // updatable-bcp-packages.txt file.
+ rule = module.Output("updatable-bcp-packages.txt")
+ expectedContents := `'mybootlib\nmyothersdklibrary\n'`
+ android.AssertStringEquals(t, "updatable-bcp-packages.txt", expectedContents, rule.Args["content"])
}),
snapshotTestPreparer(checkSnapshotWithSourcePreferred, preparerForSnapshot),
snapshotTestPreparer(checkSnapshotPreferredWithSource, preparerForSnapshot),
@@ -779,6 +789,7 @@
srcs: ["Test.java"],
compile_dex: true,
public: {enabled: true},
+ permitted_packages: ["mysdklibrary"],
}
`),
).RunTest(t)
@@ -822,6 +833,7 @@
visibility: ["//visibility:public"],
apex_available: ["myapex"],
jars: ["java/mybootlib.jar"],
+ permitted_packages: ["mybootlib"],
}
java_sdk_library_import {
@@ -831,6 +843,7 @@
apex_available: ["//apex_available:platform"],
shared_library: true,
compile_dex: true,
+ permitted_packages: ["mysdklibrary"],
public: {
jars: ["sdk_library/public/mysdklibrary-stubs.jar"],
stub_srcs: ["sdk_library/public/mysdklibrary_stub_sources"],
diff --git a/sdk/java_sdk_test.go b/sdk/java_sdk_test.go
index a2cfe6d..813dcfd 100644
--- a/sdk/java_sdk_test.go
+++ b/sdk/java_sdk_test.go
@@ -175,6 +175,7 @@
sdk_version: "none",
compile_dex: true,
host_supported: true,
+ permitted_packages: ["pkg.myjavalib"],
}
`)
@@ -188,6 +189,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:platform"],
jars: ["java/myjavalib.jar"],
+ permitted_packages: ["pkg.myjavalib"],
}
`),
checkVersionedAndroidBpContents(`
@@ -199,6 +201,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:platform"],
jars: ["java/myjavalib.jar"],
+ permitted_packages: ["pkg.myjavalib"],
}
sdk_snapshot {
@@ -437,6 +440,7 @@
system_modules: "none",
sdk_version: "none",
compile_dex: true,
+ permitted_packages: ["pkg.myjavalib"],
}
`)
@@ -450,6 +454,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:platform"],
jars: ["java/myjavalib.jar"],
+ permitted_packages: ["pkg.myjavalib"],
}
`),
checkVersionedAndroidBpContents(`
@@ -461,6 +466,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:platform"],
jars: ["java/myjavalib.jar"],
+ permitted_packages: ["pkg.myjavalib"],
}
module_exports_snapshot {
@@ -1045,6 +1051,7 @@
shared_library: false,
stubs_library_visibility: ["//other"],
stubs_source_visibility: ["//another"],
+ permitted_packages: ["pkg.myjavalib"],
}
`)
@@ -1058,6 +1065,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:anyapex"],
shared_library: false,
+ permitted_packages: ["pkg.myjavalib"],
public: {
jars: ["sdk_library/public/myjavalib-stubs.jar"],
stub_srcs: ["sdk_library/public/myjavalib_stub_sources"],
@@ -1090,6 +1098,7 @@
visibility: ["//visibility:public"],
apex_available: ["//apex_available:anyapex"],
shared_library: false,
+ permitted_packages: ["pkg.myjavalib"],
public: {
jars: ["sdk_library/public/myjavalib-stubs.jar"],
stub_srcs: ["sdk_library/public/myjavalib_stub_sources"],
diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go
index a13b0d7..97fb248 100644
--- a/sdk/sdk_test.go
+++ b/sdk/sdk_test.go
@@ -565,6 +565,49 @@
)
})
+ t.Run("SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR=module:build_from_source", func(t *testing.T) {
+ result := android.GroupFixturePreparers(
+ preparer,
+ android.FixtureMergeEnv(map[string]string{
+ "SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR": "module:build_from_source",
+ }),
+ ).RunTest(t)
+
+ checkZipFile(t, result, "out/soong/.intermediates/mysdk/common_os/mysdk-current.zip")
+
+ CheckSnapshot(t, result, "mysdk", "",
+ checkAndroidBpContents(`
+// This is auto-generated. DO NOT EDIT.
+
+java_import {
+ name: "mysdk_myjavalib@current",
+ sdk_member_name: "myjavalib",
+ visibility: ["//visibility:public"],
+ apex_available: ["//apex_available:platform"],
+ jars: ["java/myjavalib.jar"],
+}
+
+java_import {
+ name: "myjavalib",
+ prefer: false,
+ use_source_config_var: {
+ config_namespace: "module",
+ var_name: "build_from_source",
+ },
+ visibility: ["//visibility:public"],
+ apex_available: ["//apex_available:platform"],
+ jars: ["java/myjavalib.jar"],
+}
+
+sdk_snapshot {
+ name: "mysdk@current",
+ visibility: ["//visibility:public"],
+ java_header_libs: ["mysdk_myjavalib@current"],
+}
+ `),
+ )
+ })
+
t.Run("SOONG_SDK_SNAPSHOT_VERSION=unversioned", func(t *testing.T) {
result := android.GroupFixturePreparers(
preparer,
diff --git a/sdk/update.go b/sdk/update.go
index b146b62..6da3756 100644
--- a/sdk/update.go
+++ b/sdk/update.go
@@ -35,6 +35,37 @@
// By default every unversioned module in the generated snapshot has prefer: false. Building it
// with SOONG_SDK_SNAPSHOT_PREFER=true will force them to use prefer: true.
//
+// SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR
+// If set this specifies the Soong config var that can be used to control whether the prebuilt
+// modules from the generated snapshot or the original source modules. Values must be a colon
+// separated pair of strings, the first of which is the Soong config namespace, and the second
+// is the name of the variable within that namespace.
+//
+// The config namespace and var name are used to set the `use_source_config_var` property. That
+// in turn will cause the generated prebuilts to use the soong config variable to select whether
+// source or the prebuilt is used.
+// e.g. If an sdk snapshot is built using:
+// m SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR=acme:build_from_source sdkextensions-sdk
+// Then the resulting snapshot will include:
+// use_source_config_var: {
+// config_namespace: "acme",
+// var_name: "build_from_source",
+// }
+//
+// Assuming that the config variable is defined in .mk using something like:
+// $(call add_soong_config_namespace,acme)
+// $(call add_soong_config_var_value,acme,build_from_source,true)
+//
+// Then when the snapshot is unpacked in the repository it will have the following behavior:
+// m droid - will use the sdkextensions-sdk prebuilts if present. Otherwise, it will use the
+// sources.
+// m SOONG_CONFIG_acme_build_from_source=true droid - will use the sdkextensions-sdk
+// sources, if present. Otherwise, it will use the prebuilts.
+//
+// This is a temporary mechanism to control the prefer flags and will be removed once a more
+// maintainable solution has been implemented.
+// TODO(b/174997203): Remove when no longer necessary.
+//
// SOONG_SDK_SNAPSHOT_VERSION
// This provides control over the version of the generated snapshot.
//
@@ -760,6 +791,8 @@
module.insertAfter("name", "sdk_member_name", name)
// Remove the prefer property if present as versioned modules never need marking with prefer.
module.removeProperty("prefer")
+ // Ditto for use_source_config_var
+ module.removeProperty("use_source_config_var")
return module
}
@@ -1627,13 +1660,24 @@
// snapshot to be created that sets prefer: true.
// TODO(b/174997203): Remove once the ability to select the modules to prefer can be done
// dynamically at build time not at snapshot generation time.
- prefer := ctx.sdkMemberContext.Config().IsEnvTrue("SOONG_SDK_SNAPSHOT_PREFER")
+ config := ctx.sdkMemberContext.Config()
+ prefer := config.IsEnvTrue("SOONG_SDK_SNAPSHOT_PREFER")
// Set prefer. Setting this to false is not strictly required as that is the default but it does
// provide a convenient hook to post-process the generated Android.bp file, e.g. in tests to
// check the behavior when a prebuilt is preferred. It also makes it explicit what the default
// behavior is for the module.
bpModule.insertAfter("name", "prefer", prefer)
+
+ configVar := config.Getenv("SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR")
+ if configVar != "" {
+ parts := strings.Split(configVar, ":")
+ cfp := android.ConfigVarProperties{
+ Config_namespace: proptools.StringPtr(parts[0]),
+ Var_name: proptools.StringPtr(parts[1]),
+ }
+ bpModule.insertAfter("prefer", "use_source_config_var", cfp)
+ }
}
// Group the variants by os type.
diff --git a/ui/build/config.go b/ui/build/config.go
index 7370627..cd6d549 100644
--- a/ui/build/config.go
+++ b/ui/build/config.go
@@ -345,12 +345,7 @@
return
}
- b := &smpb.BuildConfig{
- ForceUseGoma: proto.Bool(config.ForceUseGoma()),
- UseGoma: proto.Bool(config.UseGoma()),
- UseRbe: proto.Bool(config.UseRBE()),
- }
- ctx.Metrics.BuildConfig(b)
+ ctx.Metrics.BuildConfig(buildConfig(config))
s := &smpb.SystemResourceInfo{
TotalPhysicalMemory: proto.Uint64(config.TotalRAM()),
@@ -359,6 +354,16 @@
ctx.Metrics.SystemResourceInfo(s)
}
+func buildConfig(config Config) *smpb.BuildConfig {
+ return &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(config.ForceUseGoma()),
+ UseGoma: proto.Bool(config.UseGoma()),
+ UseRbe: proto.Bool(config.UseRBE()),
+ BazelAsNinja: proto.Bool(config.UseBazel()),
+ BazelMixedBuild: proto.Bool(config.bazelBuildMode() == mixedBuild),
+ }
+}
+
// getConfigArgs processes the command arguments based on the build action and creates a set of new
// arguments to be accepted by Config.
func getConfigArgs(action BuildAction, dir string, ctx Context, args []string) []string {
diff --git a/ui/build/config_test.go b/ui/build/config_test.go
index 7b14c47..7d4c76b 100644
--- a/ui/build/config_test.go
+++ b/ui/build/config_test.go
@@ -26,7 +26,10 @@
"testing"
"android/soong/ui/logger"
+ smpb "android/soong/ui/metrics/metrics_proto"
"android/soong/ui/status"
+
+ "github.com/golang/protobuf/proto"
)
func testContext() Context {
@@ -995,3 +998,111 @@
})
}
}
+
+func TestBuildConfig(t *testing.T) {
+ tests := []struct {
+ name string
+ environ Environment
+ useBazel bool
+ expectedBuildConfig *smpb.BuildConfig
+ }{
+ {
+ name: "none set",
+ environ: Environment{},
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(false),
+ UseGoma: proto.Bool(false),
+ UseRbe: proto.Bool(false),
+ BazelAsNinja: proto.Bool(false),
+ BazelMixedBuild: proto.Bool(false),
+ },
+ },
+ {
+ name: "force use goma",
+ environ: Environment{"FORCE_USE_GOMA=1"},
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(true),
+ UseGoma: proto.Bool(false),
+ UseRbe: proto.Bool(false),
+ BazelAsNinja: proto.Bool(false),
+ BazelMixedBuild: proto.Bool(false),
+ },
+ },
+ {
+ name: "use goma",
+ environ: Environment{"USE_GOMA=1"},
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(false),
+ UseGoma: proto.Bool(true),
+ UseRbe: proto.Bool(false),
+ BazelAsNinja: proto.Bool(false),
+ BazelMixedBuild: proto.Bool(false),
+ },
+ },
+ {
+ name: "use rbe",
+ environ: Environment{"USE_RBE=1"},
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(false),
+ UseGoma: proto.Bool(false),
+ UseRbe: proto.Bool(true),
+ BazelAsNinja: proto.Bool(false),
+ BazelMixedBuild: proto.Bool(false),
+ },
+ },
+ {
+ name: "use bazel as ninja",
+ environ: Environment{},
+ useBazel: true,
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(false),
+ UseGoma: proto.Bool(false),
+ UseRbe: proto.Bool(false),
+ BazelAsNinja: proto.Bool(true),
+ BazelMixedBuild: proto.Bool(false),
+ },
+ },
+ {
+ name: "bazel mixed build",
+ environ: Environment{"USE_BAZEL_ANALYSIS=1"},
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(false),
+ UseGoma: proto.Bool(false),
+ UseRbe: proto.Bool(false),
+ BazelAsNinja: proto.Bool(false),
+ BazelMixedBuild: proto.Bool(true),
+ },
+ },
+ {
+ name: "all set",
+ environ: Environment{
+ "FORCE_USE_GOMA=1",
+ "USE_GOMA=1",
+ "USE_RBE=1",
+ "USE_BAZEL_ANALYSIS=1",
+ },
+ useBazel: true,
+ expectedBuildConfig: &smpb.BuildConfig{
+ ForceUseGoma: proto.Bool(true),
+ UseGoma: proto.Bool(true),
+ UseRbe: proto.Bool(true),
+ BazelAsNinja: proto.Bool(true),
+ BazelMixedBuild: proto.Bool(true),
+ },
+ },
+ }
+
+ for _, tc := range tests {
+ t.Run(tc.name, func(t *testing.T) {
+ c := &configImpl{
+ environ: &tc.environ,
+ useBazel: tc.useBazel,
+ }
+ config := Config{c}
+ actualBuildConfig := buildConfig(config)
+ if expected := tc.expectedBuildConfig; !proto.Equal(expected, actualBuildConfig) {
+ t.Errorf("Expected build config != actual build config: %#v != %#v", *expected, *actualBuildConfig)
+ }
+ })
+ }
+}
diff --git a/ui/build/dumpvars.go b/ui/build/dumpvars.go
index 83c8865..f3c442e 100644
--- a/ui/build/dumpvars.go
+++ b/ui/build/dumpvars.go
@@ -163,6 +163,7 @@
"AUX_OS_VARIANT_LIST",
"PRODUCT_SOONG_NAMESPACES",
"SOONG_SDK_SNAPSHOT_PREFER",
+ "SOONG_SDK_SNAPSHOT_USE_SOURCE_CONFIG_VAR",
"SOONG_SDK_SNAPSHOT_VERSION",
}
diff --git a/ui/metrics/metrics_proto/metrics.pb.go b/ui/metrics/metrics_proto/metrics.pb.go
index fc2cfa4..1063337 100644
--- a/ui/metrics/metrics_proto/metrics.pb.go
+++ b/ui/metrics/metrics_proto/metrics.pb.go
@@ -433,9 +433,14 @@
}
type BuildConfig struct {
- UseGoma *bool `protobuf:"varint,1,opt,name=use_goma,json=useGoma" json:"use_goma,omitempty"`
- UseRbe *bool `protobuf:"varint,2,opt,name=use_rbe,json=useRbe" json:"use_rbe,omitempty"`
- ForceUseGoma *bool `protobuf:"varint,3,opt,name=force_use_goma,json=forceUseGoma" json:"force_use_goma,omitempty"`
+ UseGoma *bool `protobuf:"varint,1,opt,name=use_goma,json=useGoma" json:"use_goma,omitempty"`
+ UseRbe *bool `protobuf:"varint,2,opt,name=use_rbe,json=useRbe" json:"use_rbe,omitempty"`
+ ForceUseGoma *bool `protobuf:"varint,3,opt,name=force_use_goma,json=forceUseGoma" json:"force_use_goma,omitempty"`
+ // Whether the Bazel is acting as the Ninja executor for this build.
+ BazelAsNinja *bool `protobuf:"varint,4,opt,name=bazel_as_ninja,json=bazelAsNinja" json:"bazel_as_ninja,omitempty"`
+ // Whether build is occurring in a mixed build mode, where Bazel maintains the
+ // definition and build of some modules in cooperation with Soong.
+ BazelMixedBuild *bool `protobuf:"varint,5,opt,name=bazel_mixed_build,json=bazelMixedBuild" json:"bazel_mixed_build,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@@ -487,6 +492,20 @@
return false
}
+func (m *BuildConfig) GetBazelAsNinja() bool {
+ if m != nil && m.BazelAsNinja != nil {
+ return *m.BazelAsNinja
+ }
+ return false
+}
+
+func (m *BuildConfig) GetBazelMixedBuild() bool {
+ if m != nil && m.BazelMixedBuild != nil {
+ return *m.BazelMixedBuild
+ }
+ return false
+}
+
type SystemResourceInfo struct {
// The total physical memory in bytes.
TotalPhysicalMemory *uint64 `protobuf:"varint,1,opt,name=total_physical_memory,json=totalPhysicalMemory" json:"total_physical_memory,omitempty"`
@@ -990,92 +1009,94 @@
}
var fileDescriptor_6039342a2ba47b72 = []byte{
- // 1380 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xef, 0x52, 0x1b, 0x37,
- 0x10, 0x8f, 0xc1, 0x60, 0x7b, 0xfd, 0x07, 0x23, 0xa0, 0x5c, 0x48, 0xd2, 0x52, 0xb7, 0x49, 0x99,
- 0x4e, 0x43, 0x32, 0x34, 0xc3, 0x64, 0x98, 0x4c, 0xa7, 0xe0, 0xd0, 0x34, 0x65, 0xc0, 0x8c, 0x08,
- 0x69, 0xda, 0x7e, 0x50, 0xe5, 0xb3, 0x0c, 0x97, 0xdc, 0x9d, 0x6e, 0x24, 0x1d, 0xc5, 0x79, 0xb3,
- 0x7e, 0xee, 0x4b, 0xf4, 0x05, 0xfa, 0x04, 0x7d, 0x81, 0x8e, 0x56, 0x77, 0xe6, 0x20, 0x6e, 0xc2,
- 0xe4, 0xdb, 0xe9, 0xb7, 0xbf, 0xdf, 0x6a, 0xb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 0xee, 0xc6, 0xd5, 0x23, 0x7e,
+ 0xf6, 0x83, 0xe0, 0x89, 0xe5, 0xec, 0x2c, 0xfd, 0x92, 0x7d, 0x45, 0x64, 0x79, 0x33, 0xfc, 0x97,
+ 0xf3, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x63, 0x09, 0x14, 0xf5, 0x0c, 0x00, 0x00,
}
diff --git a/ui/metrics/metrics_proto/metrics.proto b/ui/metrics/metrics_proto/metrics.proto
index 91d8dd9..b284bf9 100644
--- a/ui/metrics/metrics_proto/metrics.proto
+++ b/ui/metrics/metrics_proto/metrics.proto
@@ -116,6 +116,13 @@
optional bool use_rbe = 2;
optional bool force_use_goma = 3;
+
+ // Whether the Bazel is acting as the Ninja executor for this build.
+ optional bool bazel_as_ninja = 4;
+
+ // Whether build is occurring in a mixed build mode, where Bazel maintains the
+ // definition and build of some modules in cooperation with Soong.
+ optional bool bazel_mixed_build = 5;
}
message SystemResourceInfo {