Merge changes I5c7f1fc1,I6015581c into main am: 0b5a877f21
am: 9994462ccb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2774749 Change-Id: I35735b5fd49d1b1ac65bff4a71c1070e4e089534 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
committed by
Automerger Merge Worker
commit
1dd1c7712e
@@ -103,7 +103,7 @@ type BazelConversionPathContext interface {
|
|||||||
// or ":<module>") and returns a Bazel-compatible label which corresponds to dependencies on the
|
// or ":<module>") and returns a Bazel-compatible label which corresponds to dependencies on the
|
||||||
// module within the given ctx.
|
// module within the given ctx.
|
||||||
func BazelLabelForModuleDeps(ctx Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func BazelLabelForModuleDeps(ctx Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
return BazelLabelForModuleDepsWithFn(ctx, modules, BazelModuleLabel, true)
|
return BazelLabelForModuleDepsWithFn(ctx, modules, BazelModuleLabel, /*markAsDeps=*/true)
|
||||||
}
|
}
|
||||||
|
|
||||||
// BazelLabelForModuleWholeDepsExcludes expects two lists: modules (containing modules to include in
|
// BazelLabelForModuleWholeDepsExcludes expects two lists: modules (containing modules to include in
|
||||||
@@ -154,11 +154,11 @@ func BazelLabelForModuleDepsWithFn(ctx Bp2buildMutatorContext, modules []string,
|
|||||||
// the excluded dependencies.
|
// the excluded dependencies.
|
||||||
func BazelLabelForModuleDepsExcludesWithFn(ctx Bp2buildMutatorContext, modules, excludes []string,
|
func BazelLabelForModuleDepsExcludesWithFn(ctx Bp2buildMutatorContext, modules, excludes []string,
|
||||||
moduleToLabelFn func(BazelConversionPathContext, blueprint.Module) string) bazel.LabelList {
|
moduleToLabelFn func(BazelConversionPathContext, blueprint.Module) string) bazel.LabelList {
|
||||||
moduleLabels := BazelLabelForModuleDepsWithFn(ctx, RemoveListFromList(modules, excludes), moduleToLabelFn, true)
|
moduleLabels := BazelLabelForModuleDepsWithFn(ctx, RemoveListFromList(modules, excludes), moduleToLabelFn, /*markAsDeps=*/true)
|
||||||
if len(excludes) == 0 {
|
if len(excludes) == 0 {
|
||||||
return moduleLabels
|
return moduleLabels
|
||||||
}
|
}
|
||||||
excludeLabels := BazelLabelForModuleDepsWithFn(ctx, excludes, moduleToLabelFn, false)
|
excludeLabels := BazelLabelForModuleDepsWithFn(ctx, excludes, moduleToLabelFn, /*markAsDeps=*/false)
|
||||||
return bazel.LabelList{
|
return bazel.LabelList{
|
||||||
Includes: moduleLabels.Includes,
|
Includes: moduleLabels.Includes,
|
||||||
Excludes: excludeLabels.Includes,
|
Excludes: excludeLabels.Includes,
|
||||||
|
@@ -297,8 +297,7 @@ type config struct {
|
|||||||
// in tests when a path doesn't exist.
|
// in tests when a path doesn't exist.
|
||||||
TestAllowNonExistentPaths bool
|
TestAllowNonExistentPaths bool
|
||||||
|
|
||||||
// If testAllowNonExistentPaths is true then PathForSource and PathForModuleSrc won't error
|
// If true, register the "bp2build_deps" mutator in the mutator pipeline.
|
||||||
// in tests when a path doesn't exist.
|
|
||||||
Bp2buildDepsMutator bool
|
Bp2buildDepsMutator bool
|
||||||
|
|
||||||
// The list of files that when changed, must invalidate soong_build to
|
// The list of files that when changed, must invalidate soong_build to
|
||||||
|
@@ -1904,7 +1904,7 @@ func xsdConfigCppTarget(xsd android.XsdConfigBp2buildTargets) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForWholeDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func bazelLabelForWholeDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticWholeModuleDeps, true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticWholeModuleDeps, /*markAsDeps=*/true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForWholeDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
|
func bazelLabelForWholeDepsExcludes(ctx android.Bp2buildMutatorContext, modules, excludes []string) bazel.LabelList {
|
||||||
@@ -1916,11 +1916,11 @@ func bazelLabelForStaticDepsExcludes(ctx android.Bp2buildMutatorContext, modules
|
|||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForStaticDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func bazelLabelForStaticDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticModule, true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticModule, /*markAsDeps=*/true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForSharedDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func bazelLabelForSharedDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForSharedModule, true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForSharedModule, /*markAsDeps=*/true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForHeaderDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func bazelLabelForHeaderDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
|
Reference in New Issue
Block a user