Refactor cc/cc.go cc/library.go shouldCreateSourceAbiDump()
* Consolidate the two shouldCreateSourceAbiDump() in cc/cc.go and cc/library.go into cc/sabi.go. * Rename SAbiProperties.CreateSAbiDumps to ShouldCreateSourceAbiDump. * sabiDepsMutator determines whether a library needs to generate ABI dump, and mark their ShouldCreateSourceAbiDump property. * After this change, sabi.Properties.ShouldCreateSourceAbiDump is the single source of truth of whether ABI dump should be created or not. GenerateAndroidBuildActions() should check the property, or call the property accessor (*sabi).shouldCreateSourceAbiDump(). * classifySourceAbiDump() is no longer a *libraryDecorator receiver. Instead it uses the libraryInterface object in the ctx.Module().(*cc.Module).library field. This way classifySourceAbiDump() doesn't need to depend on the internal fields of libraryDecorator. Bug: 145608479 Bug: 173492236 Test: Presubmit Test: Dump the list of module names marked by sabi_deps mutator Change-Id: Ibfc29fe0153551ab6e2d56ff38ab9bae2c179e0b
Loading
Please register or sign in to comment