Avoid -O3 in nacl as it does not play well with -W.
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 20 Aug 2013 08:12:19 +0000 (08:12 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 20 Aug 2013 08:12:19 +0000 (08:12 +0000)
Also cleans up some uninitialized data I saw while investigating
the problem.

R=jkummerow@chromium.org, machenbach@chromium.org

Review URL: https://codereview.chromium.org/23119004

Patch from Ken Mixter <kmixter@google.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16235 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

build/toolchain.gypi
src/effects.h

index ddb8aaf..c1066eb 100644 (file)
                 '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', {
         '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': [
                   '-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"', {
index 8e82363..afb8f9e 100644 (file)
@@ -55,7 +55,7 @@ struct Effect {
   Modality modality;
   Bounds bounds;
 
-  Effect() {}
+  Effect() : modality(DEFINITE) {}
   Effect(Bounds b, Modality m = DEFINITE) : modality(m), bounds(b) {}
 
   // The unknown effect.