Merge "[rust] Disable clippy for rust_bindgen modules."
diff --git a/android/apex.go b/android/apex.go
index a7570dc..cd84f8a 100644
--- a/android/apex.go
+++ b/android/apex.go
@@ -137,6 +137,7 @@
//
// "//apex_available:anyapex" is a pseudo APEX name that matches to any APEX.
// "//apex_available:platform" refers to non-APEX partitions like "system.img".
+ // "com.android.gki.*" matches any APEX module name with the prefix "com.android.gki.".
// Default is ["//apex_available:platform"].
Apex_available []string
@@ -213,6 +214,7 @@
const (
AvailableToPlatform = "//apex_available:platform"
AvailableToAnyApex = "//apex_available:anyapex"
+ AvailableToGkiApex = "com.android.gki.*"
)
func CheckAvailableForApex(what string, apex_available []string) bool {
@@ -222,7 +224,8 @@
return what == AvailableToPlatform
}
return InList(what, apex_available) ||
- (what != AvailableToPlatform && InList(AvailableToAnyApex, apex_available))
+ (what != AvailableToPlatform && InList(AvailableToAnyApex, apex_available)) ||
+ (strings.HasPrefix(what, "com.android.gki.") && InList(AvailableToGkiApex, apex_available))
}
func (m *ApexModuleBase) AvailableFor(what string) bool {
@@ -256,7 +259,7 @@
func (m *ApexModuleBase) checkApexAvailableProperty(mctx BaseModuleContext) {
for _, n := range m.ApexProperties.Apex_available {
- if n == AvailableToPlatform || n == AvailableToAnyApex {
+ if n == AvailableToPlatform || n == AvailableToAnyApex || n == AvailableToGkiApex {
continue
}
if !mctx.OtherModuleExists(n) && !mctx.Config().AllowMissingDependencies() {
diff --git a/apex/apex_test.go b/apex/apex_test.go
index bfd7dfe..a6f3805 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -414,7 +414,14 @@
system_shared_libs: [],
static_executable: true,
stl: "none",
- apex_available: [ "myapex" ],
+ apex_available: [ "myapex", "com.android.gki.*" ],
+ }
+
+ apex {
+ name: "com.android.gki.fake",
+ binaries: ["foo"],
+ key: "myapex.key",
+ file_contexts: ":myapex-file_contexts",
}
cc_library_shared {
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 7afba2a..1e6becb 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -248,18 +248,18 @@
FlagWithInput("--csv ", stubFlags).
Inputs(flagsCSV).
FlagWithInput("--unsupported ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-unsupported.txt")).
FlagWithInput("--unsupported-ignore-conflicts ", combinedRemovedApis).
FlagWithInput("--max-target-q ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-q.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-max-target-q.txt")).
FlagWithInput("--max-target-p ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-p.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-max-target-p.txt")).
FlagWithInput("--max-target-o-ignore-conflicts ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-max-o.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-max-target-o.txt")).
FlagWithInput("--blocked ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blacklist.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-force-blocked.txt")).
FlagWithInput("--unsupported-packages ",
- android.PathForSource(ctx, "frameworks/base/config/hiddenapi-greylist-packages.txt")).
+ android.PathForSource(ctx, "frameworks/base/config/hiddenapi-unsupported-packages.txt")).
FlagWithOutput("--output ", tempPath)
commitChangeForRestat(rule, tempPath, outputPath)
diff --git a/rust/bindgen.go b/rust/bindgen.go
index b926e08..403f466 100644
--- a/rust/bindgen.go
+++ b/rust/bindgen.go
@@ -173,6 +173,7 @@
_, library := NewRustLibrary(hod)
library.BuildOnlyRust()
+ library.setNoLint()
library.sourceProvider = bindgen
module.sourceProvider = bindgen
diff --git a/rust/compiler.go b/rust/compiler.go
index c2b7e56..0274015 100644
--- a/rust/compiler.go
+++ b/rust/compiler.go
@@ -32,6 +32,10 @@
compiler.Properties.No_stdlibs = proptools.BoolPtr(true)
}
+func (compiler *baseCompiler) setNoLint() {
+ compiler.Properties.No_lint = proptools.BoolPtr(true)
+}
+
func NewBaseCompiler(dir, dir64 string, location installLocation) *baseCompiler {
return &baseCompiler{
Properties: BaseCompilerProperties{},