Merge "Tell make that sh_test is a NATIVE_TEST"
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 26418ad..2d80c22 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -39,7 +39,8 @@
// the default.
hwasanCflags = []string{"-fno-omit-frame-pointer", "-Wno-frame-larger-than=",
"-mllvm", "-hwasan-create-frame-descriptions=0",
- "-mllvm", "-hwasan-allow-ifunc"}
+ "-mllvm", "-hwasan-allow-ifunc",
+ "-fsanitize-hwaddress-abi=platform"}
cfiCflags = []string{"-flto", "-fsanitize-cfi-cross-dso",
"-fsanitize-blacklist=external/compiler-rt/lib/cfi/cfi_blacklist.txt"}
diff --git a/java/sdk_library.go b/java/sdk_library.go
index 18866d5..72cce57 100644
--- a/java/sdk_library.go
+++ b/java/sdk_library.go
@@ -668,11 +668,11 @@
}
func (module *SdkLibrary) createInternalModules(mctx android.TopDownMutatorContext) {
- if module.Library.Module.properties.Srcs == nil {
+ if len(module.Library.Module.properties.Srcs) == 0 {
mctx.PropertyErrorf("srcs", "java_sdk_library must specify srcs")
}
- if module.sdkLibraryProperties.Api_packages == nil {
+ if len(module.sdkLibraryProperties.Api_packages) == 0 {
mctx.PropertyErrorf("api_packages", "java_sdk_library must specify api_packages")
}
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index 6e8e306..48078d8 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -82,7 +82,11 @@
}
func syspropLibraryHook(ctx android.LoadHookContext, m *syspropLibrary) {
- if m.syspropLibraryProperties.Api_packages == nil {
+ if len(m.commonProperties.Srcs) == 0 {
+ ctx.PropertyErrorf("srcs", "sysprop_library must specify srcs")
+ }
+
+ if len(m.syspropLibraryProperties.Api_packages) == 0 {
ctx.PropertyErrorf("api_packages", "sysprop_library must specify api_packages")
}