Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 390fc746 authored by Colin Cross's avatar Colin Cross
Browse files

Disable sanitizers that use runtimes for linux_musl arm64

We don't built clang sanitizer runtimes for host arm64 yet,
disable sanitizer that need them when building for linux_musl arm64.

Test: builds
Change-Id: Id4fcb7f9743ac30121157b2294eb60216eaff7b3
parent 64a4a5f5
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -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