Remove more duplicated flags and dependencies
All the stats below are for a hikey960-eng build on AOSP master. Number of order-only inputs in out/soong/build.ninja: Before: 2847162 After: 606508 Size of: Before After out/soong/build.ninja 572MB 233MB -59% out/soong/Android-hikey960.mk 15MB 9MB -40% out/build-hikey960.ninja 367MB 358MB -2% Ninja time in `m nothing`: Before: 6.9s After: 5.0s Soong generation time: Before: 11.6s After: 6.6s Test: m nothing Test: wrote script that counted inputs, only duplicates were removed Test: treehugger Change-Id: I6b7c5ef5b1395014b7bf5fd0b8112d42bee127bf
This commit is contained in:
7
cc/cc.go
7
cc/cc.go
@@ -1138,6 +1138,13 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
|
||||
|
||||
// Dedup exported flags from dependencies
|
||||
depPaths.Flags = firstUniqueElements(depPaths.Flags)
|
||||
depPaths.GeneratedHeaders = android.FirstUniquePaths(depPaths.GeneratedHeaders)
|
||||
depPaths.ReexportedFlags = firstUniqueElements(depPaths.ReexportedFlags)
|
||||
depPaths.ReexportedFlagsDeps = android.FirstUniquePaths(depPaths.ReexportedFlagsDeps)
|
||||
|
||||
if c.sabi != nil {
|
||||
c.sabi.Properties.ReexportedIncludeFlags = firstUniqueElements(c.sabi.Properties.ReexportedIncludeFlags)
|
||||
}
|
||||
|
||||
return depPaths
|
||||
}
|
||||
|
Reference in New Issue
Block a user