Revert of [build] Use -O2 on linux by default (patchset #1 id:1 of https://codereview.chromium.org/1963693004/ )

Reason for revert:
Causes regressions.

Original issue's description:
> [build] Use -O2 on linux by default
>
> This switches O2 -> O3 to match chromium's configuration.
>
> This makes the difference between gn and gyp a bit smaller
> before switching.
>
> BUG=chromium:474921
> LOG=n
>
> Committed: https://crrev.com/a37ab71e343b8cc24df05868b941a49e0c271376
> Cr-Commit-Position: refs/heads/master@{#36124}

TBR=jochen@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:474921

Review-Url: https://codereview.chromium.org/1958253004
Cr-Commit-Position: refs/heads/master@{#36135}
This commit is contained in:
machenbach 2016-05-10 05:08:14 -07:00 committed by Commit bot
parent 3cc7315eda
commit 413d9e2f41

View File

@ -1183,13 +1183,23 @@
'cflags!': [
'-O0',
'-O1',
'-O3',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
'-O2',
],
'conditions': [
# TODO(crbug.com/272548): Avoid -O3 in NaCl
# Don't use -O3 with sanitizers.
['nacl_target_arch=="none" and asan==0 and msan==0 and lsan==0 \
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
'cflags': ['-O3'],
'cflags!': ['-O2'],
}, {
'cflags': ['-O2'],
'cflags!': ['-O3'],
}],
],
}],
['OS=="mac"', {
@ -1291,14 +1301,24 @@
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" \
or OS=="aix"', {
'cflags!': [
'-O3',
'-Os',
],
'cflags': [
'-fdata-sections',
'-ffunction-sections',
'<(wno_array_bounds)',
'-O2',
],
'conditions': [
# TODO(crbug.com/272548): Avoid -O3 in NaCl
# Don't use -O3 with sanitizers.
['nacl_target_arch=="none" and asan==0 and msan==0 and lsan==0 \
and tsan==0 and ubsan==0 and ubsan_vptr==0', {
'cflags': ['-O3'],
'cflags!': ['-O2'],
}, {
'cflags': ['-O2'],
'cflags!': ['-O3'],
}],
],
}],
['OS=="android"', {