gofmt soong
Test: Presubmits Change-Id: Ia76c35ba51685eca29df51738000eacd3f43ce20
This commit is contained in:
@@ -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, /*markAsDeps=*/true)
|
return BazelLabelForModuleDepsWithFn(ctx, modules, BazelModuleLabel, 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, /*markAsDeps=*/true)
|
moduleLabels := BazelLabelForModuleDepsWithFn(ctx, RemoveListFromList(modules, excludes), moduleToLabelFn, true)
|
||||||
if len(excludes) == 0 {
|
if len(excludes) == 0 {
|
||||||
return moduleLabels
|
return moduleLabels
|
||||||
}
|
}
|
||||||
excludeLabels := BazelLabelForModuleDepsWithFn(ctx, excludes, moduleToLabelFn, /*markAsDeps=*/false)
|
excludeLabels := BazelLabelForModuleDepsWithFn(ctx, excludes, moduleToLabelFn, false)
|
||||||
return bazel.LabelList{
|
return bazel.LabelList{
|
||||||
Includes: moduleLabels.Includes,
|
Includes: moduleLabels.Includes,
|
||||||
Excludes: excludeLabels.Includes,
|
Excludes: excludeLabels.Includes,
|
||||||
|
@@ -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, /*markAsDeps=*/true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticWholeModuleDeps, 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, /*markAsDeps=*/true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForStaticModule, 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, /*markAsDeps=*/true)
|
return android.BazelLabelForModuleDepsWithFn(ctx, modules, bazelLabelForSharedModule, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func bazelLabelForHeaderDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
func bazelLabelForHeaderDeps(ctx android.Bp2buildMutatorContext, modules []string) bazel.LabelList {
|
||||||
|
@@ -128,7 +128,6 @@ func (props *OrderfileProperties) addInstrumentationProfileGatherFlags(ctx Modul
|
|||||||
return flags
|
return flags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (props *OrderfileProperties) loadOrderfileFlags(ctx ModuleContext, file string) []string {
|
func (props *OrderfileProperties) loadOrderfileFlags(ctx ModuleContext, file string) []string {
|
||||||
flags := []string{fmt.Sprintf(orderfileUseFormat, file)}
|
flags := []string{fmt.Sprintf(orderfileUseFormat, file)}
|
||||||
flags = append(flags, orderfileOtherFlags...)
|
flags = append(flags, orderfileOtherFlags...)
|
||||||
@@ -217,7 +216,7 @@ func orderfileDepsMutator(mctx android.TopDownMutatorContext) {
|
|||||||
|
|
||||||
if dep, ok := dep.(*Module); ok {
|
if dep, ok := dep.(*Module); ok {
|
||||||
if m.orderfile.Properties.OrderfileInstrLink {
|
if m.orderfile.Properties.OrderfileInstrLink {
|
||||||
dep.orderfile.Properties.OrderfileInstrLink = true;
|
dep.orderfile.Properties.OrderfileInstrLink = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -15,8 +15,8 @@
|
|||||||
package cc
|
package cc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"testing"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
"testing"
|
||||||
|
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user