Index: build/toolchain.gypi |
=================================================================== |
--- build/toolchain.gypi (revision 16180) |
+++ build/toolchain.gypi (working copy) |
@@ -561,14 +561,22 @@ |
'cflags!': [ |
'-O0', |
'-O1', |
- '-O2', |
'-Os', |
], |
'cflags': [ |
'-fdata-sections', |
'-ffunction-sections', |
- '-O3', |
], |
+ 'conditions': [ |
+ # TODO(crbug.com/272548): Avoid -O3 in NaCl |
+ ['nacl_target_arch=="none"', { |
+ 'cflags': ['-O3'], |
+ 'cflags!': ['-O2'], |
+ }, { |
+ 'cflags': ['-O2'], |
+ 'cflags!': ['-O3'], |
+ }], |
+ ] |
}], |
['v8_optimized_debug!=0 and gcc_version==44 and clang==0', { |
'cflags': [ |
@@ -614,13 +622,11 @@ |
'conditions': [ |
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', { |
'cflags!': [ |
- '-O2', |
'-Os', |
], |
'cflags': [ |
'-fdata-sections', |
'-ffunction-sections', |
- '-O3', |
'<(wno_array_bounds)', |
], |
'conditions': [ |
@@ -630,7 +636,15 @@ |
'-fno-tree-vrp', |
], |
}], |
- ], |
+ # TODO(crbug.com/272548): Avoid -O3 in NaCl |
+ ['nacl_target_arch=="none"', { |
+ 'cflags': ['-O3'], |
+ 'cflags!': ['-O2'], |
+ }, { |
+ 'cflags': ['-O2'], |
+ 'cflags!': ['-O3'], |
+ }], |
+ ] |
}], |
['OS=="android"', { |
'cflags!': [ |