From 20823f95e6d90d7961b3c97ec57b4bcb2b8a24ab Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 6 Nov 2017 15:12:17 -0800 Subject: [PATCH] Set -fomit-frame-pointer for all devices -fomit-frame-pointer was only being set for arm and mips. Since we always use unwind tables and not frame pointers to unwind, and since ART generated code does not use frame pointers, just turn off frame pointers everywhere to gain an extra register. Bug: 68951394 Test: m checkbuild Change-Id: I9237d486a0c0215cdafd96d66712082df0eba785 --- cc/config/arm_device.go | 4 +--- cc/config/global.go | 1 + cc/config/mips_device.go | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go index 0f28d1e28..9512fd146 100644 --- a/cc/config/arm_device.go +++ b/cc/config/arm_device.go @@ -27,9 +27,7 @@ var ( "-msoft-float", } - armCflags = []string{ - "-fomit-frame-pointer", - } + armCflags = []string{} armCppflags = []string{} diff --git a/cc/config/global.go b/cc/config/global.go index 44ad30b43..e4a6403a9 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -62,6 +62,7 @@ var ( "-fstack-protector-strong", "-Wa,--noexecstack", "-D_FORTIFY_SOURCE=2", + "-fomit-frame-pointer", "-Wstrict-aliasing=2", diff --git a/cc/config/mips_device.go b/cc/config/mips_device.go index 9709ada47..8b7bae3f2 100644 --- a/cc/config/mips_device.go +++ b/cc/config/mips_device.go @@ -22,7 +22,6 @@ import ( var ( mipsCflags = []string{ - "-fomit-frame-pointer", "-Umips", }