Merge "Delete unused functions" am: 31b9a0c9da
am: d6f6a86e34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1749403 Change-Id: Iac4dd19b2984f28d89e0c4e75117f197407674a4
This commit is contained in:
commit
787f1d9086
6 changed files with 0 additions and 57 deletions
26
cc/cc.go
26
cc/cc.go
|
@ -525,8 +525,6 @@ type DepsContext interface {
|
|||
// feature represents additional (optional) steps to building cc-related modules, such as invocation
|
||||
// of clang-tidy.
|
||||
type feature interface {
|
||||
begin(ctx BaseModuleContext)
|
||||
deps(ctx DepsContext, deps Deps) Deps
|
||||
flags(ctx ModuleContext, flags Flags) Flags
|
||||
props() []interface{}
|
||||
}
|
||||
|
@ -1898,21 +1896,12 @@ func (c *Module) begin(ctx BaseModuleContext) {
|
|||
if c.coverage != nil {
|
||||
c.coverage.begin(ctx)
|
||||
}
|
||||
if c.sabi != nil {
|
||||
c.sabi.begin(ctx)
|
||||
}
|
||||
if c.vndkdep != nil {
|
||||
c.vndkdep.begin(ctx)
|
||||
}
|
||||
if c.lto != nil {
|
||||
c.lto.begin(ctx)
|
||||
}
|
||||
if c.pgo != nil {
|
||||
c.pgo.begin(ctx)
|
||||
}
|
||||
for _, feature := range c.features {
|
||||
feature.begin(ctx)
|
||||
}
|
||||
if ctx.useSdk() && c.IsSdkVariant() {
|
||||
version, err := nativeApiLevelFromUser(ctx, ctx.sdkVersion())
|
||||
if err != nil {
|
||||
|
@ -1936,24 +1925,9 @@ func (c *Module) deps(ctx DepsContext) Deps {
|
|||
if c.stl != nil {
|
||||
deps = c.stl.deps(ctx, deps)
|
||||
}
|
||||
if c.sanitize != nil {
|
||||
deps = c.sanitize.deps(ctx, deps)
|
||||
}
|
||||
if c.coverage != nil {
|
||||
deps = c.coverage.deps(ctx, deps)
|
||||
}
|
||||
if c.sabi != nil {
|
||||
deps = c.sabi.deps(ctx, deps)
|
||||
}
|
||||
if c.vndkdep != nil {
|
||||
deps = c.vndkdep.deps(ctx, deps)
|
||||
}
|
||||
if c.lto != nil {
|
||||
deps = c.lto.deps(ctx, deps)
|
||||
}
|
||||
for _, feature := range c.features {
|
||||
deps = feature.deps(ctx, deps)
|
||||
}
|
||||
|
||||
deps.WholeStaticLibs = android.LastUniqueStrings(deps.WholeStaticLibs)
|
||||
deps.StaticLibs = android.LastUniqueStrings(deps.StaticLibs)
|
||||
|
|
|
@ -80,10 +80,6 @@ func (lto *lto) begin(ctx BaseModuleContext) {
|
|||
}
|
||||
}
|
||||
|
||||
func (lto *lto) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
return deps
|
||||
}
|
||||
|
||||
func (lto *lto) useClangLld(ctx BaseModuleContext) bool {
|
||||
if lto.Properties.Use_clang_lld != nil {
|
||||
return Bool(lto.Properties.Use_clang_lld)
|
||||
|
|
|
@ -45,12 +45,6 @@ func (sabi *sabi) props() []interface{} {
|
|||
return []interface{}{&sabi.Properties}
|
||||
}
|
||||
|
||||
func (sabi *sabi) begin(ctx BaseModuleContext) {}
|
||||
|
||||
func (sabi *sabi) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
return deps
|
||||
}
|
||||
|
||||
func (sabi *sabi) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
// Filter out flags which libTooling don't understand.
|
||||
// This is here for legacy reasons and future-proof, in case the version of libTooling and clang
|
||||
|
|
|
@ -499,14 +499,6 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
|||
}
|
||||
}
|
||||
|
||||
func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
if !sanitize.Properties.SanitizerEnabled { // || c.static() {
|
||||
return deps
|
||||
}
|
||||
|
||||
return deps
|
||||
}
|
||||
|
||||
func toDisableImplicitIntegerChange(flags []string) bool {
|
||||
// Returns true if any flag is fsanitize*integer, and there is
|
||||
// no explicit flag about sanitize=implicit-integer-sign-change.
|
||||
|
|
|
@ -61,13 +61,6 @@ func (tidy *tidyFeature) props() []interface{} {
|
|||
return []interface{}{&tidy.Properties}
|
||||
}
|
||||
|
||||
func (tidy *tidyFeature) begin(ctx BaseModuleContext) {
|
||||
}
|
||||
|
||||
func (tidy *tidyFeature) deps(ctx DepsContext, deps Deps) Deps {
|
||||
return deps
|
||||
}
|
||||
|
||||
func (tidy *tidyFeature) flags(ctx ModuleContext, flags Flags) Flags {
|
||||
CheckBadTidyFlags(ctx, "tidy_flags", tidy.Properties.Tidy_flags)
|
||||
CheckBadTidyChecks(ctx, "tidy_checks", tidy.Properties.Tidy_checks)
|
||||
|
|
|
@ -100,12 +100,6 @@ func (vndk *vndkdep) props() []interface{} {
|
|||
return []interface{}{&vndk.Properties}
|
||||
}
|
||||
|
||||
func (vndk *vndkdep) begin(ctx BaseModuleContext) {}
|
||||
|
||||
func (vndk *vndkdep) deps(ctx BaseModuleContext, deps Deps) Deps {
|
||||
return deps
|
||||
}
|
||||
|
||||
func (vndk *vndkdep) isVndk() bool {
|
||||
return Bool(vndk.Properties.Vndk.Enabled)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue