diff options
| author | 2023-12-12 18:08:40 +0000 | |
|---|---|---|
| committer | 2023-12-12 18:08:40 +0000 | |
| commit | b22fb3598107e8ec8851f901b03404f24e812d3a (patch) | |
| tree | c7d895a398a18bf76f31214cc3c3e4c352d1b787 /cc/library.go | |
| parent | 284ec6a2d7631db621179837301410258103e294 (diff) | |
| parent | 26d380bf2292eb2d4c3b3ed492291373bbecc14c (diff) | |
Merge "Build native libraries used by layoutlib." into main am: c1fb159206 am: 1529f7f8de am: 26d380bf22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2868429
Change-Id: I39c8c98c0ac4612ce1acdc9629ae7e5866d8e80c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cc/library.go')
| -rw-r--r-- | cc/library.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cc/library.go b/cc/library.go index 2aa0b1b7e..4d5a2547b 100644 --- a/cc/library.go +++ b/cc/library.go @@ -400,6 +400,8 @@ type libraryDecorator struct { // Location of the linked, unstripped library for shared libraries unstrippedOutputFile android.Path + // Location of the linked, stripped library for shared libraries, strip: "all" + strippedAllOutputFile android.Path // Location of the file that should be copied to dist dir when requested distFile android.Path @@ -1201,6 +1203,17 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext, } } + // Generate an output file for dist as if strip: "all" is set on the module. + // Currently this is for layoutlib release process only. + for _, dist := range ctx.Module().(*Module).Dists() { + if dist.Tag != nil && *dist.Tag == "stripped_all" { + strippedAllOutputFile := android.PathForModuleOut(ctx, "stripped_all", fileName) + transformStrip(ctx, outputFile, strippedAllOutputFile, StripFlags{Toolchain: flags.Toolchain}) + library.strippedAllOutputFile = strippedAllOutputFile + break + } + } + sharedLibs := deps.EarlySharedLibs sharedLibs = append(sharedLibs, deps.SharedLibs...) sharedLibs = append(sharedLibs, deps.LateSharedLibs...) @@ -1262,6 +1275,10 @@ func (library *libraryDecorator) unstrippedOutputFilePath() android.Path { return library.unstrippedOutputFile } +func (library *libraryDecorator) strippedAllOutputFilePath() android.Path { + return library.strippedAllOutputFile +} + func (library *libraryDecorator) disableStripping() { library.stripper.StripProperties.Strip.None = BoolPtr(true) } |