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

Commit 34296538 authored by Aditya Kumar's avatar Aditya Kumar Committed by Gerrit Code Review
Browse files

Merge "Disable LTO and CFI for riscv64"

parents babb1337 1281b994
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -91,6 +91,11 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
		return flags
	}

	// TODO(b/254713216): LTO doesn't work on riscv64 yet.
	if ctx.Arch().ArchType == android.Riscv64 {
		return flags
	}

	if lto.LTO(ctx) {
		var ltoCFlag string
		var ltoLdFlag string
+6 −0
Original line number Diff line number Diff line
@@ -653,6 +653,12 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
		s.Integer_overflow = nil
	}

	// TODO(b/254713216): CFI doesn't work for riscv64 yet because LTO doesn't work.
	if ctx.Arch().ArchType == android.Riscv64 {
		s.Cfi = nil
		s.Diag.Cfi = nil
	}

	// Disable CFI for musl
	if ctx.toolchain().Musl() {
		s.Cfi = nil