aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Stjernholm <mast@google.com>2020-04-06 22:57:21 +0100
committerPaul Duffin <paulduffin@google.com>2020-05-06 08:18:49 +0100
commit13b8b6ac70a0b51e3630fdf61e8bf10b12a611d1 (patch)
tree0192b02645a19c00d8c32ef8d2a92495f282e1ad
parentcd497b05066d860f47c7cc17d21240309a26d2d0 (diff)
downloadbuild_soong-13b8b6ac70a0b51e3630fdf61e8bf10b12a611d1.tar.gz
build_soong-13b8b6ac70a0b51e3630fdf61e8bf10b12a611d1.tar.bz2
build_soong-13b8b6ac70a0b51e3630fdf61e8bf10b12a611d1.zip
Do not propagate the stub symbol file to prebuilts.
This partially reverts https://r.android.com/1278193. The propagated symbol files contain all versions, even though only one is applicable in a given SDK snapshot. It's uncertain what repercussions this might have, but one is that if we were to update a snapshot for a fixed version then it might change because the symbol file contains new versions that aren't applicable. Since the symbol file isn't actually needed at this point it's better to wait with this step until the use cases for it are more clear. Test: m nothing Test: Create an SDK snapshot with Bionic libs, drop it into a master-art tree without bionic/ in it, build ART APEXes, and check that the Soong phase completes (specifically that the stubs are detected even without symbol files). Bug: 152481980 Merged-In: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d Change-Id: Ic79f89bc6d11d0b6552fa20791f5680ff9a40c0d (cherry picked from commit bdd0dffc1b93d137a7642998219e6e7849873218)
-rw-r--r--cc/cc.go7
-rw-r--r--cc/library.go4
-rw-r--r--cc/library_sdk_member.go8
-rw-r--r--sdk/cc_sdk_test.go2
4 files changed, 0 insertions, 21 deletions
diff --git a/cc/cc.go b/cc/cc.go
index e6731aa2..ec0f1a08 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -612,13 +612,6 @@ func (c *Module) GetDepsInLinkOrder() []android.Path {
return c.depsInLinkOrder
}
-func (c *Module) StubsSymbolFile() android.OptionalPath {
- if library, ok := c.linker.(*libraryDecorator); ok {
- return library.stubsSymbolFile
- }
- return android.OptionalPath{}
-}
-
func (c *Module) StubsVersions() []string {
if c.linker != nil {
if library, ok := c.linker.(*libraryDecorator); ok {
diff --git a/cc/library.go b/cc/library.go
index 1a07c438..8d4992cb 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -367,9 +367,6 @@ type libraryDecorator struct {
// Location of the file that should be copied to dist dir when requested
distFile android.OptionalPath
- // stubs.symbol_file
- stubsSymbolFile android.OptionalPath
-
versionScriptPath android.ModuleGenPath
post_install_cmds []string
@@ -606,7 +603,6 @@ func (library *libraryDecorator) shouldCreateSourceAbiDump(ctx ModuleContext) bo
func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
if library.buildStubs() {
- library.stubsSymbolFile = android.OptionalPathForModuleSrc(ctx, library.Properties.Stubs.Symbol_file)
objs, versionScript := compileStubLibrary(ctx, flags, String(library.Properties.Stubs.Symbol_file), library.MutatedProperties.StubsVersion, "--apex")
library.versionScriptPath = versionScript
return objs
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index 4e4df5b0..754b96a9 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -271,10 +271,7 @@ func addPossiblyArchSpecificProperties(sdkModuleContext android.ModuleContext, b
}
if len(libInfo.StubsVersion) > 0 {
- symbolFilePath := filepath.Join(nativeEtcDir, libInfo.StubsSymbolFile.Path().Base())
- builder.CopyToSnapshot(libInfo.StubsSymbolFile.Path(), symbolFilePath)
stubsSet := outputProperties.AddPropertySet("stubs")
- stubsSet.AddProperty("symbol_file", symbolFilePath)
stubsSet.AddProperty("versions", []string{libInfo.StubsVersion})
}
}
@@ -283,7 +280,6 @@ const (
nativeIncludeDir = "include"
nativeGeneratedIncludeDir = "include_gen"
nativeStubDir = "lib"
- nativeEtcDir = "etc"
)
// path to the native library. Relative to <sdk_root>/<api_dir>
@@ -348,9 +344,6 @@ type nativeLibInfoProperties struct {
// are not in use.
StubsVersion string
- // The stubs symbol file.
- StubsSymbolFile android.OptionalPath
-
// outputFile is not exported as it is always arch specific.
outputFile android.Path
}
@@ -389,7 +382,6 @@ func (p *nativeLibInfoProperties) PopulateFromVariant(ctx android.SdkMemberConte
if ccModule.HasStubsVariants() {
p.StubsVersion = ccModule.StubsVersion()
- p.StubsSymbolFile = ccModule.StubsSymbolFile()
}
}
diff --git a/sdk/cc_sdk_test.go b/sdk/cc_sdk_test.go
index 9e6086f1..780da9fc 100644
--- a/sdk/cc_sdk_test.go
+++ b/sdk/cc_sdk_test.go
@@ -1766,7 +1766,6 @@ cc_prebuilt_library_shared {
sdk_member_name: "stubslib",
installable: false,
stubs: {
- symbol_file: "etc/stubslib.map.txt",
versions: ["3"],
},
arch: {
@@ -1783,7 +1782,6 @@ cc_prebuilt_library_shared {
name: "stubslib",
prefer: false,
stubs: {
- symbol_file: "etc/stubslib.map.txt",
versions: ["3"],
},
arch: {