Add separate debug and release configurations in gyp files
Disable optimizations in debug mode. Use that for specs.
This commit is contained in:
parent
545e575508
commit
66a50d4e4a
3 changed files with 24 additions and 2 deletions
16
project.gyp
16
project.gyp
|
|
@ -2,6 +2,7 @@
|
|||
'targets': [
|
||||
{
|
||||
'target_name': 'compiler',
|
||||
|
||||
'type': 'static_library',
|
||||
'include_dirs': [
|
||||
'include',
|
||||
|
|
@ -117,11 +118,26 @@
|
|||
],
|
||||
|
||||
'target_defaults': {
|
||||
'default_configuration': 'Release',
|
||||
'configurations': {
|
||||
'Debug': {
|
||||
'cflags': [ '-g', '-O0' ],
|
||||
'xcode_settings': {
|
||||
'GCC_OPTIMIZATION_LEVEL': '0',
|
||||
},
|
||||
},
|
||||
'Release': {
|
||||
'cflags': [ '-O2', '-fno-strict-aliasing' ],
|
||||
'cflags!': [ '-O3', '-fstrict-aliasing' ],
|
||||
},
|
||||
},
|
||||
|
||||
'cflags': [
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wno-unused-parameter'
|
||||
],
|
||||
|
||||
'xcode_settings': {
|
||||
'ALWAYS_SEARCH_USER_PATHS': 'NO',
|
||||
'WARNING_CFLAGS': [
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ function run_tests {
|
|||
local mode=normal
|
||||
local args=()
|
||||
local target=$1
|
||||
local cmd="out/Default/${target}"
|
||||
local cmd="out/Debug/${target}"
|
||||
shift
|
||||
|
||||
while getopts "df:ghv" option; do
|
||||
|
|
@ -47,7 +47,7 @@ function run_tests {
|
|||
esac
|
||||
done
|
||||
|
||||
make $target
|
||||
BUILDTYPE=Debug make $target
|
||||
args=${args:-""}
|
||||
|
||||
case ${mode} in
|
||||
|
|
|
|||
|
|
@ -46,7 +46,12 @@
|
|||
],
|
||||
|
||||
'target_defaults': {
|
||||
'default_configuration': 'Debug',
|
||||
'configurations': {'Debug': {}},
|
||||
|
||||
'cflags': [
|
||||
'-g',
|
||||
'-O0',
|
||||
'-Wall',
|
||||
'-Wextra',
|
||||
'-Wno-unused-parameter',
|
||||
|
|
@ -58,6 +63,7 @@
|
|||
'cflags_cc': [
|
||||
'-std=c++0x',
|
||||
],
|
||||
|
||||
'xcode_settings': {
|
||||
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
|
||||
'ALWAYS_SEARCH_USER_PATHS': 'NO',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue