Enable CFI for riscv64
This patch reverts the last remaining piece of commit 1281b99495b0cea56701750bd63b4c7cd8e074be as LTO has been enabled in I66c83b1116550179043490a11f66b8630c0e6b1b
Testing:
```
$ source build/envsetup.sh
$ lunch aosp_cf_riscv64_minidroid-userdebug
$ m
$ launch_cvd --num_instances=8 --daemon
$ adb devices
List of devices attached
0.0.0.0:6520 device
0.0.0.0:6521 device
0.0.0.0:6522 device
0.0.0.0:6523 device
0.0.0.0:6524 device
0.0.0.0:6525 device
0.0.0.0:6526 device
0.0.0.0:6527 device
```
Bug: b/282584808, b/254713216
Change-Id: I6fe5b1001c2c64e2a4a55176f4017bb445570176
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 626005b..6c38355 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -675,12 +675,6 @@
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