Skip to content

Commit

Permalink
build: turn on strict aliasing in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Feb 25, 2013
1 parent 39c8a90 commit 6ba6f4b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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': [
Expand Down Expand Up @@ -163,7 +169,7 @@
'PREBINDING': 'NO', # No -Wl,-prebind
'USE_HEADERMAP': 'NO',
'OTHER_CFLAGS': [
'-fno-strict-aliasing',
'-fstrict-aliasing',
],
'WARNING_CFLAGS': [
'-Wall',
Expand Down
3 changes: 2 additions & 1 deletion uv.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,8 @@
'-pedantic',
'-Wall',
'-Wextra',
'-Wno-unused-parameter'
'-Wstrict-aliasing',
'-Wno-unused-parameter',
],
'sources': [
'include/uv-private/uv-unix.h',
Expand Down

0 comments on commit 6ba6f4b

Please sign in to comment.