From b37620f8704a2267e52317fe2e201d455a418cfe Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 6 Nov 2017 14:05:51 -0800 Subject: [PATCH] Remove gcc-specific optimizations These flags were added for gcc, but are always stripped out when compiling for clang. Since gcc is barely used, removed them. Bug: 68855788 Bug: 68947919 Test: m checkbuild Change-Id: Iae2bda9808dd9499848ce145ccdf71c4c490b80e --- cc/config/arm64_device.go | 7 ------- cc/config/arm_device.go | 9 --------- cc/config/mips64_device.go | 7 ------- cc/config/mips_device.go | 6 ------ cc/config/x86_64_device.go | 4 ---- cc/config/x86_device.go | 6 +----- 6 files changed, 1 insertion(+), 38 deletions(-) diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go index c3dd8e840..5bb7749a8 100644 --- a/cc/config/arm64_device.go +++ b/cc/config/arm64_device.go @@ -25,13 +25,6 @@ var ( arm64Cflags = []string{ // Help catch common 32/64-bit errors. "-Werror=implicit-function-declaration", - - "-fno-strict-volatile-bitfields", - - // TARGET_RELEASE_CFLAGS - "-fgcse-after-reload", - "-frerun-cse-after-loop", - "-frename-registers", } arm64Ldflags = []string{ diff --git a/cc/config/arm_device.go b/cc/config/arm_device.go index 1b09242e7..0f28d1e28 100644 --- a/cc/config/arm_device.go +++ b/cc/config/arm_device.go @@ -28,14 +28,6 @@ var ( } armCflags = []string{ - "-fno-builtin-sin", - "-fno-strict-volatile-bitfields", - - // TARGET_RELEASE_CFLAGS - "-fgcse-after-reload", - "-frerun-cse-after-loop", - "-frename-registers", - "-fomit-frame-pointer", } @@ -49,7 +41,6 @@ var ( armArmCflags = []string{ "-fstrict-aliasing", - "-funswitch-loops", } armThumbCflags = []string{ diff --git a/cc/config/mips64_device.go b/cc/config/mips64_device.go index 97d6a7201..a6191b653 100644 --- a/cc/config/mips64_device.go +++ b/cc/config/mips64_device.go @@ -22,17 +22,10 @@ import ( var ( mips64Cflags = []string{ - "-fomit-frame-pointer", - "-funswitch-loops", "-Umips", // Help catch common 32/64-bit errors. "-Werror=implicit-function-declaration", - - // TARGET_RELEASE_CFLAGS - "-fgcse-after-reload", - "-frerun-cse-after-loop", - "-frename-registers", } mips64ClangCflags = append(mips64Cflags, []string{ diff --git a/cc/config/mips_device.go b/cc/config/mips_device.go index 9cd8b5fb0..9709ada47 100644 --- a/cc/config/mips_device.go +++ b/cc/config/mips_device.go @@ -23,13 +23,7 @@ import ( var ( mipsCflags = []string{ "-fomit-frame-pointer", - "-funswitch-loops", "-Umips", - - // TARGET_RELEASE_CFLAGS - "-fgcse-after-reload", - "-frerun-cse-after-loop", - "-frename-registers", } mipsClangCflags = append(mipsCflags, []string{ diff --git a/cc/config/x86_64_device.go b/cc/config/x86_64_device.go index e461c457f..12f3e6fa2 100644 --- a/cc/config/x86_64_device.go +++ b/cc/config/x86_64_device.go @@ -22,10 +22,6 @@ import ( var ( x86_64Cflags = []string{ - "-finline-functions", - "-finline-limit=300", - "-funswitch-loops", - // Help catch common 32/64-bit errors. "-Werror=implicit-function-declaration", } diff --git a/cc/config/x86_device.go b/cc/config/x86_device.go index 8fd65f7ac..b9ce4af3e 100644 --- a/cc/config/x86_device.go +++ b/cc/config/x86_device.go @@ -21,11 +21,7 @@ import ( ) var ( - x86Cflags = []string{ - "-finline-functions", - "-finline-limit=300", - "-funswitch-loops", - } + x86Cflags = []string{} x86ClangCflags = append(x86Cflags, []string{ "-msse3",