Revert "Use cp instead of install for ndk_headers"
This reverts commit 1202729cb215ea039306a2e2b88eddaff20b73cd.
Reason for revert: Breaks aosp-main/ndk builds
Change-Id: I453792f7f974dc336d5f6775adfc5899b8d34d7b
diff --git a/cc/ndk_library.go b/cc/ndk_library.go
index b9e6bc4..64193b1 100644
--- a/cc/ndk_library.go
+++ b/cc/ndk_library.go
@@ -518,19 +518,19 @@
// Returns the install path for unversioned NDK libraries (currently only static
// libraries).
-func getUnversionedLibraryInstallPath(ctx ModuleContext) android.OutputPath {
+func getUnversionedLibraryInstallPath(ctx ModuleContext) android.InstallPath {
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.OutputPath {
+func getVersionedLibraryInstallPath(ctx ModuleContext, apiLevel android.ApiLevel) android.InstallPath {
return getUnversionedLibraryInstallPath(ctx).Join(ctx, apiLevel.String())
}
func (stub *stubDecorator) install(ctx ModuleContext, path android.Path) {
installDir := getVersionedLibraryInstallPath(ctx, stub.apiLevel)
- stub.installPath = installDir.Join(ctx, path.Base())
+ stub.installPath = ctx.InstallFile(installDir, path.Base(), path)
}
func newStubLibrary() *Module {