build: turn on strict aliasing in release builds

This commit is contained in:
Ben Noordhuis 2013-02-25 03:43:01 +01:00
parent 39c8a90a91
commit 6ba6f4b4d6
2 changed files with 10 additions and 3 deletions

View File

@ -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',

3
uv.gyp
View File

@ -112,7 +112,8 @@
'-pedantic',
'-Wall',
'-Wextra',
'-Wno-unused-parameter'
'-Wstrict-aliasing',
'-Wno-unused-parameter',
],
'sources': [
'include/uv-private/uv-unix.h',