Disable LTO and CFI for riscv64

This reverts commit 24870216e9.

Reason for revert: b/282584808

Change-Id: I3808121b4437fdd01db5d305d8f0377e6ad7bd9e
This commit is contained in:
Aditya Kumar
2023-05-16 01:15:24 +00:00
parent 24870216e9
commit 1281b99495
2 changed files with 11 additions and 0 deletions

View File

@@ -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

View File

@@ -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