diff options
author | 2024-04-03 23:59:40 +0000 | |
---|---|---|
committer | 2024-04-04 01:58:21 +0000 | |
commit | 1202729cb215ea039306a2e2b88eddaff20b73cd (patch) | |
tree | 314e71716ff278b4e0097b7b7df2ca8d635559f5 /cc/ndk_library.go | |
parent | 219ce55481a3f532a11e84c9f683daa7681f6735 (diff) |
Use cp instead of install for ndk_headers
ndk_headers currently use ctx.Install to install headers in
out/soong/ndk/sysroot. The files are subsequently used to compile ndk
variants of cc libraries on host.
Since these headers are not actually installed on device, use android.Cp
to assemble the NDK sysroot. By itself, it should be a no-op, but
androd.Cp is more friendly with restricting the installation rules to
PRODUCT_PACKAGES.
To make it explicit that the sysroot is not a typical installation path,
this CL also modifies the type to OutputPath
Test: m
Bug: 332778109
Change-Id: I1131c3c764443cbaac525c6022cd09c47695d275
Diffstat (limited to 'cc/ndk_library.go')
-rw-r--r-- | cc/ndk_library.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cc/ndk_library.go b/cc/ndk_library.go index 64193b166..b9e6bc4a1 100644 --- a/cc/ndk_library.go +++ b/cc/ndk_library.go @@ -518,19 +518,19 @@ func (stub *stubDecorator) nativeCoverage() bool { // Returns the install path for unversioned NDK libraries (currently only static // libraries). -func getUnversionedLibraryInstallPath(ctx ModuleContext) android.InstallPath { +func getUnversionedLibraryInstallPath(ctx ModuleContext) android.OutputPath { return getNdkSysrootBase(ctx).Join(ctx, "usr/lib", config.NDKTriple(ctx.toolchain())) } // Returns the install path for versioned NDK libraries. These are most often // stubs, but the same paths are used for CRT objects. -func getVersionedLibraryInstallPath(ctx ModuleContext, apiLevel android.ApiLevel) android.InstallPath { +func getVersionedLibraryInstallPath(ctx ModuleContext, apiLevel android.ApiLevel) android.OutputPath { return getUnversionedLibraryInstallPath(ctx).Join(ctx, apiLevel.String()) } func (stub *stubDecorator) install(ctx ModuleContext, path android.Path) { installDir := getVersionedLibraryInstallPath(ctx, stub.apiLevel) - stub.installPath = ctx.InstallFile(installDir, path.Base(), path) + stub.installPath = installDir.Join(ctx, path.Base()) } func newStubLibrary() *Module { |