Permalink
Browse files

build: turn on strict aliasing in release builds

  • Loading branch information...
1 parent 39c8a90 commit 6ba6f4b4d651c1e3aff6946ef3c7a2f1b2c5d6d8 @bnoordhuis committed Feb 25, 2013
Showing with 10 additions and 3 deletions.
  1. +8 −2 common.gypi
  2. +2 −1 uv.gyp
View
@@ -45,7 +45,13 @@
},
'Release': {
'defines': [ 'NDEBUG' ],
- 'cflags': [ '-O3', '-fomit-frame-pointer', '-fdata-sections', '-ffunction-sections' ],
+ 'cflags': [
+ '-O3',
+ '-fstrict-aliasing',
+ '-fomit-frame-pointer',
+ '-fdata-sections',
+ '-ffunction-sections',
+ ],
'msvs_settings': {
'VCCLCompilerTool': {
'target_conditions': [
@@ -163,7 +169,7 @@
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
- '-fno-strict-aliasing',
+ '-fstrict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
View
3 uv.gyp
@@ -112,7 +112,8 @@
'-pedantic',
'-Wall',
'-Wextra',
- '-Wno-unused-parameter'
+ '-Wstrict-aliasing',
+ '-Wno-unused-parameter',
],
'sources': [
'include/uv-private/uv-unix.h',

0 comments on commit 6ba6f4b

Please sign in to comment.