Merge "NDK sysroot: include each license file only once"
diff --git a/cc/ndk_sysroot.go b/cc/ndk_sysroot.go
index 144fc09..80b5c6a 100644
--- a/cc/ndk_sysroot.go
+++ b/cc/ndk_sysroot.go
@@ -132,6 +132,10 @@
}
})
+ // Include only a single copy of each license file. The Bionic NOTICE is
+ // long and is referenced by multiple Bionic modules.
+ licensePaths = android.FirstUniquePaths(licensePaths)
+
combinedLicense := getNdkInstallBase(ctx).Join(ctx, "NOTICE")
ctx.Build(pctx, android.BuildParams{
Rule: android.Cat,