Merge changes from topic "musl_arm64"

* changes:
  Disable sanitizers that use runtimes for linux_musl arm64
  Separate host and host cross fuzz packaging
This commit is contained in:
Colin Cross 2023-05-19 18:03:22 +00:00 committed by Gerrit Code Review
commit b3f28b2e04
3 changed files with 21 additions and 2 deletions

View file

@ -398,7 +398,9 @@ func (s *ccRustFuzzPackager) GenerateBuildActions(ctx android.SingletonContext)
}
hostOrTargetString := "target"
if ccModule.Host() {
if ccModule.Target().HostCross {
hostOrTargetString = "host_cross"
} else if ccModule.Host() {
hostOrTargetString = "host"
}

View file

@ -665,6 +665,21 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
s.Diag.Cfi = nil
}
// TODO(b/280478629): runtimes don't exist for musl arm64 yet.
if ctx.toolchain().Musl() && ctx.Arch().ArchType == android.Arm64 {
s.Address = nil
s.Hwaddress = nil
s.Thread = nil
s.Scudo = nil
s.Fuzzer = nil
s.Cfi = nil
s.Diag.Cfi = nil
s.Misc_undefined = nil
s.Undefined = nil
s.All_undefined = nil
s.Integer_overflow = nil
}
// Also disable CFI for VNDK variants of components
if ctx.isVndk() && ctx.useVndk() {
s.Cfi = nil

View file

@ -150,7 +150,9 @@ func (s *javaFuzzPackager) GenerateBuildActions(ctx android.SingletonContext) {
}
hostOrTargetString := "target"
if javaFuzzModule.Host() {
if javaFuzzModule.Target().HostCross {
hostOrTargetString = "host_cross"
} else if javaFuzzModule.Host() {
hostOrTargetString = "host"
}