| Index: build/toolchain.gypi
|
| diff --git a/build/toolchain.gypi b/build/toolchain.gypi
|
| index 1e1bed3ee02b4de53af227490307dec1fe944a6a..285e14f85a383289e7bb3543e08e6f2bf7a4ae57 100644
|
| --- a/build/toolchain.gypi
|
| +++ b/build/toolchain.gypi
|
| @@ -59,6 +59,10 @@
|
| 'mips_arch_variant%': 'mips32r2',
|
|
|
| 'v8_enable_backtrace%': 0,
|
| +
|
| + # Turns on compiler optimizations in Debug builds (#defines are unaffected).
|
| + 'v8_optimized_debug%': 0,
|
| +
|
| # Enable profiling support. Only required on Windows.
|
| 'v8_enable_prof%': 0,
|
|
|
| @@ -73,6 +77,9 @@
|
| 'werror%': '-Werror',
|
| # For a shared library build, results in "libv8-<(soname_version).so".
|
| 'soname_version%': '',
|
| +
|
| + # Allow to suppress the array bounds warning (default is no suppression).
|
| + 'wno_array_bounds%': '',
|
| },
|
| 'target_defaults': {
|
| 'conditions': [
|
| @@ -441,14 +448,22 @@
|
| ],
|
| 'msvs_settings': {
|
| 'VCCLCompilerTool': {
|
| - 'Optimization': '0',
|
| -
|
| 'conditions': [
|
| - ['OS=="win" and component=="shared_library"', {
|
| + ['component=="shared_library"', {
|
| 'RuntimeLibrary': '3', # /MDd
|
| }, {
|
| 'RuntimeLibrary': '1', # /MTd
|
| }],
|
| + ['v8_optimized_debug==1', {
|
| + 'Optimization': '1',
|
| + 'InlineFunctionExpansion': '2',
|
| + 'EnableIntrinsicFunctions': 'true',
|
| + 'FavorSizeOrSpeed': '0',
|
| + 'StringPooling': 'true',
|
| + 'BasicRuntimeChecks': '0',
|
| + }, {
|
| + 'Optimization': '0',
|
| + }],
|
| ],
|
| },
|
| 'VCLinkerTool': {
|
| @@ -459,10 +474,31 @@
|
| ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
|
| 'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-parameter',
|
| '-Wnon-virtual-dtor', '-Woverloaded-virtual',
|
| + '<(wno_array_bounds)',
|
| # Hide some GCC 4.8 warnings:
|
| # TODO(jbramley): Only enable these on GCC 4.8.
|
| '-Wno-unused-local-typedefs',
|
| '-Wno-maybe-uninitialized' ],
|
| + 'conditions': [
|
| + ['v8_optimized_debug==1', {
|
| + 'cflags!': [
|
| + '-O0',
|
| + '-O2',
|
| + '-Os',
|
| + ],
|
| + 'cflags': [
|
| + '-fdata-sections',
|
| + '-ffunction-sections',
|
| + '-O1',
|
| + ],
|
| + }],
|
| + ['v8_optimized_debug==1 and gcc_version==44 and clang==0', {
|
| + 'cflags': [
|
| + # Avoid crashes with gcc 4.4 in the v8 test suite.
|
| + '-fno-tree-vrp',
|
| + ],
|
| + }],
|
| + ],
|
| }],
|
| ['OS=="linux" and v8_enable_backtrace==1', {
|
| # Support for backtrace_symbols.
|
| @@ -484,7 +520,14 @@
|
| }],
|
| ['OS=="mac"', {
|
| 'xcode_settings': {
|
| - 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
|
| + 'conditions': [
|
| + ['v8_optimized_debug==1', {
|
| + 'GCC_OPTIMIZATION_LEVEL': '1', # -O1
|
| + 'GCC_STRICT_ALIASING': 'YES',
|
| + }, {
|
| + 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
|
| + }],
|
| + ],
|
| },
|
| }],
|
| ],
|
| @@ -500,6 +543,7 @@
|
| '-fdata-sections',
|
| '-ffunction-sections',
|
| '-O3',
|
| + '<(wno_array_bounds)',
|
| # Hide some GCC 4.8 warnings:
|
| # TODO(jbramley): Only enable these on GCC 4.8.
|
| '-Wno-unused-local-typedefs',
|
| @@ -553,7 +597,7 @@
|
| 'FavorSizeOrSpeed': '0',
|
| 'StringPooling': 'true',
|
| 'conditions': [
|
| - ['OS=="win" and component=="shared_library"', {
|
| + ['component=="shared_library"', {
|
| 'RuntimeLibrary': '2', #/MD
|
| }, {
|
| 'RuntimeLibrary': '0', #/MT
|
|
|