Loading cc/cc.go +7 −0 Original line number Diff line number Diff line Loading @@ -4079,6 +4079,13 @@ func (c *Module) BaseModuleName() string { return c.ModuleBase.BaseModuleName() } func (c *Module) stubsSymbolFilePath() android.Path { if library, ok := c.linker.(*libraryDecorator); ok { return library.stubsSymbolFilePath } return android.OptionalPath{}.Path() } var Bool = proptools.Bool var BoolDefault = proptools.BoolDefault var BoolPtr = proptools.BoolPtr Loading cc/library.go +4 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,9 @@ type libraryDecorator struct { *baseInstaller apiListCoverageXmlPath android.ModuleOutPath // Path to the file containing the APIs exported by this library stubsSymbolFilePath android.Path } // linkerProps returns the list of properties structs relevant for this library. (For example, if Loading Loading @@ -596,6 +599,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa ctx.PropertyErrorf("symbol_file", "%q doesn't have .map.txt suffix", symbolFile) return Objects{} } library.stubsSymbolFilePath = android.PathForModuleSrc(ctx, symbolFile) // b/239274367 --apex and --systemapi filters symbols tagged with # apex and # // systemapi, respectively. The former is for symbols defined in platform libraries // and the latter is for symbols defined in APEXes. Loading cc/library_sdk_member.go +11 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,9 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b if len(libInfo.StubsVersions) > 0 { stubsSet := outputProperties.AddPropertySet("stubs") stubsSet.AddProperty("versions", libInfo.StubsVersions) // The symbol file will be copied next to the Android.bp file stubsSet.AddProperty("symbol_file", libInfo.StubsSymbolFilePath.Base()) builder.CopyToSnapshot(libInfo.StubsSymbolFilePath, libInfo.StubsSymbolFilePath.Base()) } } Loading Loading @@ -481,6 +484,9 @@ type nativeLibInfoProperties struct { // is written to does not vary by arch so cannot be android specific. StubsVersions []string `sdk:"ignored-on-host"` // The symbol file containing the APIs exported by this library. StubsSymbolFilePath android.Path `sdk:"ignored-on-host"` // Value of SanitizeProperties.Sanitize. Several - but not all - of these // affect the expanded variants. All are propagated to avoid entangling the // sanitizer logic with the snapshot generation. Loading Loading @@ -549,6 +555,11 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte // the versioned stub libs are retained in the prebuilt tree; currently only // the stub corresponding to ccModule.StubsVersion() is. p.StubsVersions = lib.allStubsVersions() if lib.buildStubs() && ccModule.stubsSymbolFilePath() == nil { ctx.ModuleErrorf("Could not determine symbol_file") } else { p.StubsSymbolFilePath = ccModule.stubsSymbolFilePath() } } } p.SystemSharedLibs = specifiedDeps.systemSharedLibs Loading sdk/cc_sdk_test.go +2 −0 Original line number Diff line number Diff line Loading @@ -2205,6 +2205,7 @@ cc_prebuilt_library_shared { "3", "current", ], symbol_file: "stubslib.map.txt", }, arch: { arm64: { Loading Loading @@ -2268,6 +2269,7 @@ cc_prebuilt_library_shared { "3", "current", ], symbol_file: "stubslib.map.txt", }, target: { host: { Loading Loading
cc/cc.go +7 −0 Original line number Diff line number Diff line Loading @@ -4079,6 +4079,13 @@ func (c *Module) BaseModuleName() string { return c.ModuleBase.BaseModuleName() } func (c *Module) stubsSymbolFilePath() android.Path { if library, ok := c.linker.(*libraryDecorator); ok { return library.stubsSymbolFilePath } return android.OptionalPath{}.Path() } var Bool = proptools.Bool var BoolDefault = proptools.BoolDefault var BoolPtr = proptools.BoolPtr Loading
cc/library.go +4 −0 Original line number Diff line number Diff line Loading @@ -428,6 +428,9 @@ type libraryDecorator struct { *baseInstaller apiListCoverageXmlPath android.ModuleOutPath // Path to the file containing the APIs exported by this library stubsSymbolFilePath android.Path } // linkerProps returns the list of properties structs relevant for this library. (For example, if Loading Loading @@ -596,6 +599,7 @@ func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps Pa ctx.PropertyErrorf("symbol_file", "%q doesn't have .map.txt suffix", symbolFile) return Objects{} } library.stubsSymbolFilePath = android.PathForModuleSrc(ctx, symbolFile) // b/239274367 --apex and --systemapi filters symbols tagged with # apex and # // systemapi, respectively. The former is for symbols defined in platform libraries // and the latter is for symbols defined in APEXes. Loading
cc/library_sdk_member.go +11 −0 Original line number Diff line number Diff line Loading @@ -406,6 +406,9 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b if len(libInfo.StubsVersions) > 0 { stubsSet := outputProperties.AddPropertySet("stubs") stubsSet.AddProperty("versions", libInfo.StubsVersions) // The symbol file will be copied next to the Android.bp file stubsSet.AddProperty("symbol_file", libInfo.StubsSymbolFilePath.Base()) builder.CopyToSnapshot(libInfo.StubsSymbolFilePath, libInfo.StubsSymbolFilePath.Base()) } } Loading Loading @@ -481,6 +484,9 @@ type nativeLibInfoProperties struct { // is written to does not vary by arch so cannot be android specific. StubsVersions []string `sdk:"ignored-on-host"` // The symbol file containing the APIs exported by this library. StubsSymbolFilePath android.Path `sdk:"ignored-on-host"` // Value of SanitizeProperties.Sanitize. Several - but not all - of these // affect the expanded variants. All are propagated to avoid entangling the // sanitizer logic with the snapshot generation. Loading Loading @@ -549,6 +555,11 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte // the versioned stub libs are retained in the prebuilt tree; currently only // the stub corresponding to ccModule.StubsVersion() is. p.StubsVersions = lib.allStubsVersions() if lib.buildStubs() && ccModule.stubsSymbolFilePath() == nil { ctx.ModuleErrorf("Could not determine symbol_file") } else { p.StubsSymbolFilePath = ccModule.stubsSymbolFilePath() } } } p.SystemSharedLibs = specifiedDeps.systemSharedLibs Loading
sdk/cc_sdk_test.go +2 −0 Original line number Diff line number Diff line Loading @@ -2205,6 +2205,7 @@ cc_prebuilt_library_shared { "3", "current", ], symbol_file: "stubslib.map.txt", }, arch: { arm64: { Loading Loading @@ -2268,6 +2269,7 @@ cc_prebuilt_library_shared { "3", "current", ], symbol_file: "stubslib.map.txt", }, target: { host: { Loading