From 0c4620f3ab2b8240c476bb4d3fad7133b4d29259 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Mon, 15 Jun 2015 15:12:53 -0700 Subject: [PATCH] Build with -g, -O0 for specs --- project.gyp | 8 ++++++++ tests.gyp | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/project.gyp b/project.gyp index 7e566d8f..5c0b0c98 100644 --- a/project.gyp +++ b/project.gyp @@ -114,6 +114,9 @@ 'cflags_c': [ '-std=c99' ], + 'ldflags': [ + '-g', + ], 'direct_dependent_settings': { 'include_dirs': [ 'include' @@ -127,6 +130,11 @@ 'configurations': { 'Debug': { 'cflags': [ '-g' ], + 'ldflags': [ '-g' ], + 'xcode_settings': { + 'OTHER_LDFLAGS': ['-g'], + 'GCC_OPTIMIZATION_LEVEL': '0', + }, }, 'Release': { 'cflags': [ '-O2', '-fno-strict-aliasing' ], diff --git a/tests.gyp b/tests.gyp index 613b2c19..65b54112 100644 --- a/tests.gyp +++ b/tests.gyp @@ -59,11 +59,14 @@ '-Wno-unknown-pragmas', ], 'cflags_c': [ - '-std=c99' + '-std=c99', ], 'cflags_cc': [ '-std=c++0x', ], + 'ldflags': [ + '-g', + ], 'variables': { 'USE_LIBPROFILER%': 'true', @@ -76,6 +79,8 @@ 'xcode_settings': { 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', + 'OTHER_LDFLAGS': ['-g'], + 'GCC_OPTIMIZATION_LEVEL': '0', 'ALWAYS_SEARCH_USER_PATHS': 'NO', 'WARNING_CFLAGS': [ '-Wall',