1 # Copyright 2013 the V8 project authors. All rights reserved.
2 # Redistribution and use in source and binary forms, with or without
3 # modification, are permitted provided that the following conditions are
6 # * Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer.
8 # * Redistributions in binary form must reproduce the above
9 # copyright notice, this list of conditions and the following
10 # disclaimer in the documentation and/or other materials provided
11 # with the distribution.
12 # * Neither the name of Google Inc. nor the names of its
13 # contributors may be used to endorse or promote products derived
14 # from this software without specific prior written permission.
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 # Shared definitions for all V8-related targets.
32 'msvs_use_common_release': 0,
33 'gcc_version%': 'unknown',
35 'v8_target_arch%': '<(target_arch)',
36 # Native Client builds currently use the V8 ARM JIT and
37 # arm/simulator-arm.cc to defer the significant effort required
38 # for NaCl JIT support. The nacl_target_arch variable provides
39 # the 'true' target arch for places in this file that need it.
40 # TODO(bradchen): get rid of nacl_target_arch when someday
41 # NaCl V8 builds stop using the ARM simulator
42 'nacl_target_arch%': 'none', # must be set externally
44 # Setting 'v8_can_use_vfp32dregs' to 'true' will cause V8 to use the VFP
45 # registers d16-d31 in the generated code, both in the snapshot and for the
46 # ARM target. Leaving the default value of 'false' will avoid the use of
47 # these registers in the snapshot and use CPU feature probing when running
49 'v8_can_use_vfp32dregs%': 'false',
50 'arm_test_noprobe%': 'off',
52 # Similar to vfp but on MIPS.
53 'v8_can_use_fpu_instructions%': 'true',
55 # Similar to the ARM hard float ABI but on MIPS.
56 'v8_use_mips_abi_hardfloat%': 'true',
58 'v8_enable_backtrace%': 0,
60 # Enable profiling support. Only required on Windows.
63 # Some versions of GCC 4.5 seem to need -fno-strict-aliasing.
64 'v8_no_strict_aliasing%': 0,
66 # Chrome needs this definition unconditionally. For standalone V8 builds,
67 # it's handled in build/standalone.gypi.
68 'want_separate_host_toolset%': 1,
70 # Toolset the d8 binary should be compiled for. Possible values are 'host'
71 # and 'target'. If you want to run v8 tests, it needs to be set to 'target'.
72 # The setting is ignored if want_separate_host_toolset is 0.
73 'v8_toolset_for_d8%': 'target',
77 # For a shared library build, results in "libv8-<(soname_version).so".
78 'soname_version%': '',
80 # Allow to suppress the array bounds warning (default is no suppression).
81 'wno_array_bounds%': '',
83 # Link-Time Optimizations
87 # This is set when building the Android WebView inside the Android build
88 # system, using the 'android' gyp backend.
89 'android_webview_build%': 0,
91 # Copy it out one scope.
92 'android_webview_build%': '<(android_webview_build)',
95 ['host_arch=="ia32" or host_arch=="x64" or clang==1', {
97 'host_cxx_is_biarch%': 1,
101 'host_cxx_is_biarch%': 0,
104 ['target_arch=="ia32" or target_arch=="x64" or target_arch=="x87" or \
107 'target_cxx_is_biarch%': 1,
111 'target_cxx_is_biarch%': 0,
117 ['v8_target_arch=="arm"', {
119 'V8_TARGET_ARCH_ARM',
122 [ 'arm_version==7 or arm_version=="default"', {
124 'CAN_USE_ARMV7_INSTRUCTIONS',
127 [ 'arm_fpu=="vfpv3-d16" or arm_fpu=="default"', {
129 'CAN_USE_VFP3_INSTRUCTIONS',
132 [ 'arm_fpu=="vfpv3"', {
134 'CAN_USE_VFP3_INSTRUCTIONS',
135 'CAN_USE_VFP32DREGS',
138 [ 'arm_fpu=="neon"', {
140 'CAN_USE_VFP3_INSTRUCTIONS',
141 'CAN_USE_VFP32DREGS',
145 [ 'arm_test_noprobe=="on"', {
147 'ARM_TEST_NO_FEATURE_PROBE',
151 'target_conditions': [
152 ['_toolset=="host"', {
154 ['v8_target_arch==host_arch and android_webview_build==0', {
155 # Host built with an Arm CXX compiler.
157 [ 'arm_version==7', {
158 'cflags': ['-march=armv7-a',],
160 [ 'arm_version==7 or arm_version=="default"', {
162 [ 'arm_fpu!="default"', {
163 'cflags': ['-mfpu=<(arm_fpu)',],
167 [ 'arm_float_abi!="default"', {
168 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
171 'cflags': ['-mthumb',],
174 'cflags': ['-marm',],
178 # 'v8_target_arch!=host_arch'
179 # Host not built with an Arm CXX compiler (simulator build).
181 [ 'arm_float_abi=="hard"', {
183 'USE_EABI_HARDFLOAT=1',
186 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
188 'USE_EABI_HARDFLOAT=0',
194 }], # _toolset=="host"
195 ['_toolset=="target"', {
197 ['v8_target_arch==target_arch and android_webview_build==0', {
198 # Target built with an Arm CXX compiler.
200 [ 'arm_version==7', {
201 'cflags': ['-march=armv7-a',],
203 [ 'arm_version==7 or arm_version=="default"', {
205 [ 'arm_fpu!="default"', {
206 'cflags': ['-mfpu=<(arm_fpu)',],
210 [ 'arm_float_abi!="default"', {
211 'cflags': ['-mfloat-abi=<(arm_float_abi)',],
214 'cflags': ['-mthumb',],
217 'cflags': ['-marm',],
221 # 'v8_target_arch!=target_arch'
222 # Target not built with an Arm CXX compiler (simulator build).
224 [ 'arm_float_abi=="hard"', {
226 'USE_EABI_HARDFLOAT=1',
229 [ 'arm_float_abi=="softfp" or arm_float_abi=="default"', {
231 'USE_EABI_HARDFLOAT=0',
237 # v8 is optimized for speed, which takes precedence over
238 # size optimization in LTO.
246 }], # _toolset=="target"
248 }], # v8_target_arch=="arm"
249 ['v8_target_arch=="arm64"', {
251 'V8_TARGET_ARCH_ARM64',
254 ['v8_target_arch=="ia32"', {
256 'V8_TARGET_ARCH_IA32',
258 }], # v8_target_arch=="ia32"
259 ['v8_target_arch=="x87"', {
261 'V8_TARGET_ARCH_X87',
263 'cflags': ['-march=i586'],
264 }], # v8_target_arch=="x87"
265 ['v8_target_arch=="mips"', {
267 'V8_TARGET_ARCH_MIPS',
270 [ 'v8_can_use_fpu_instructions=="true"', {
272 'CAN_USE_FPU_INSTRUCTIONS',
275 [ 'v8_use_mips_abi_hardfloat=="true"', {
277 '__mips_hard_float=1',
278 'CAN_USE_FPU_INSTRUCTIONS',
282 '__mips_soft_float=1'
286 'target_conditions': [
287 ['_toolset=="target"', {
289 ['v8_target_arch==target_arch and android_webview_build==0', {
290 # Target built with a Mips CXX compiler.
294 [ 'v8_use_mips_abi_hardfloat=="true"', {
295 'cflags': ['-mhard-float'],
296 'ldflags': ['-mhard-float'],
298 'cflags': ['-msoft-float'],
299 'ldflags': ['-msoft-float'],
301 ['mips_arch_variant=="r6"', {
303 '_MIPS_ARCH_MIPS32R6',
306 'cflags!': ['-mfp32', '-mfpxx'],
307 'cflags': ['-mips32r6', '-Wa,-mips32r6'],
310 '-Wl,--dynamic-linker=$(LDSO_PATH)',
311 '-Wl,--rpath=$(LD_R_PATH)',
314 ['mips_arch_variant=="r2"', {
316 [ 'mips_fpu_mode=="fp64"', {
318 '_MIPS_ARCH_MIPS32R2',
321 'cflags': ['-mfp64'],
323 ['mips_fpu_mode=="fpxx"', {
325 '_MIPS_ARCH_MIPS32R2',
328 'cflags': ['-mfpxx'],
330 ['mips_fpu_mode=="fp32"', {
332 '_MIPS_ARCH_MIPS32R2',
335 'cflags': ['-mfp32'],
338 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
339 'ldflags': ['-mips32r2'],
341 ['mips_arch_variant=="r1"', {
345 'cflags!': ['-mfp64', '-mfpxx'],
346 'cflags': ['-mips32', '-Wa,-mips32'],
347 'ldflags': ['-mips32'],
349 ['mips_arch_variant=="rx"', {
351 '_MIPS_ARCH_MIPS32RX',
354 'cflags!': ['-mfp64', '-mfp32'],
355 'cflags': ['-mips32', '-Wa,-mips32', '-mfpxx'],
356 'ldflags': ['-mips32'],
360 # 'v8_target_arch!=target_arch'
361 # Target not built with an MIPS CXX compiler (simulator build).
363 ['mips_arch_variant=="r6"', {
365 '_MIPS_ARCH_MIPS32R6',
369 ['mips_arch_variant=="r2"', {
371 [ 'mips_fpu_mode=="fp64"', {
373 '_MIPS_ARCH_MIPS32R2',
377 ['mips_fpu_mode=="fpxx"', {
379 '_MIPS_ARCH_MIPS32R2',
383 ['mips_fpu_mode=="fp32"', {
385 '_MIPS_ARCH_MIPS32R2',
391 ['mips_arch_variant=="r1"', {
396 ['mips_arch_variant=="rx"', {
398 '_MIPS_ARCH_MIPS32RX',
405 }], #_toolset=="target"
406 ['_toolset=="host"', {
408 ['mips_arch_variant=="rx"', {
410 '_MIPS_ARCH_MIPS32RX',
414 ['mips_arch_variant=="r6"', {
416 '_MIPS_ARCH_MIPS32R6',
420 ['mips_arch_variant=="r2"', {
422 ['mips_fpu_mode=="fp64"', {
424 '_MIPS_ARCH_MIPS32R2',
428 ['mips_fpu_mode=="fpxx"', {
430 '_MIPS_ARCH_MIPS32R2',
434 ['mips_fpu_mode=="fp32"', {
436 '_MIPS_ARCH_MIPS32R2',
442 ['mips_arch_variant=="r1"', {
443 'defines': ['FPU_MODE_FP32',],
446 }], #_toolset=="host"
448 }], # v8_target_arch=="mips"
449 ['v8_target_arch=="mipsel"', {
451 'V8_TARGET_ARCH_MIPS',
454 [ 'v8_can_use_fpu_instructions=="true"', {
456 'CAN_USE_FPU_INSTRUCTIONS',
459 [ 'v8_use_mips_abi_hardfloat=="true"', {
461 '__mips_hard_float=1',
462 'CAN_USE_FPU_INSTRUCTIONS',
466 '__mips_soft_float=1'
470 'target_conditions': [
471 ['_toolset=="target"', {
473 ['v8_target_arch==target_arch and android_webview_build==0', {
474 # Target built with a Mips CXX compiler.
478 [ 'v8_use_mips_abi_hardfloat=="true"', {
479 'cflags': ['-mhard-float'],
480 'ldflags': ['-mhard-float'],
482 'cflags': ['-msoft-float'],
483 'ldflags': ['-msoft-float'],
485 ['mips_arch_variant=="r6"', {
487 '_MIPS_ARCH_MIPS32R6',
490 'cflags!': ['-mfp32', '-mfpxx'],
491 'cflags': ['-mips32r6', '-Wa,-mips32r6'],
494 '-Wl,--dynamic-linker=$(LDSO_PATH)',
495 '-Wl,--rpath=$(LD_R_PATH)',
498 ['mips_arch_variant=="r2"', {
500 [ 'mips_fpu_mode=="fp64"', {
502 '_MIPS_ARCH_MIPS32R2',
505 'cflags': ['-mfp64'],
507 ['mips_fpu_mode=="fpxx"', {
509 '_MIPS_ARCH_MIPS32R2',
512 'cflags': ['-mfpxx'],
514 ['mips_fpu_mode=="fp32"', {
516 '_MIPS_ARCH_MIPS32R2',
519 'cflags': ['-mfp32'],
522 'cflags': ['-mips32r2', '-Wa,-mips32r2'],
523 'ldflags': ['-mips32r2'],
525 ['mips_arch_variant=="r1"', {
526 'cflags!': ['-mfp64', '-mfpxx'],
527 'cflags': ['-mips32', '-Wa,-mips32'],
528 'ldflags': ['-mips32'],
530 ['mips_arch_variant=="rx"', {
532 '_MIPS_ARCH_MIPS32RX',
535 'cflags!': ['-mfp64', '-mfp32'],
536 'cflags': ['-mips32', '-Wa,-mips32', '-mfpxx'],
537 'ldflags': ['-mips32'],
539 ['mips_arch_variant=="loongson"', {
541 '_MIPS_ARCH_LOONGSON',
544 'cflags!': ['-mfp64', '-mfp32', '-mfpxx'],
545 'cflags': ['-mips3', '-Wa,-mips3'],
549 # 'v8_target_arch!=target_arch'
550 # Target not built with an MIPS CXX compiler (simulator build).
552 ['mips_arch_variant=="r6"', {
554 '_MIPS_ARCH_MIPS32R6',
558 ['mips_arch_variant=="r2"', {
560 [ 'mips_fpu_mode=="fp64"', {
562 '_MIPS_ARCH_MIPS32R2',
566 ['mips_fpu_mode=="fpxx"', {
568 '_MIPS_ARCH_MIPS32R2',
572 ['mips_fpu_mode=="fp32"', {
574 '_MIPS_ARCH_MIPS32R2',
580 ['mips_arch_variant=="r1"', {
585 ['mips_arch_variant=="rx"', {
587 '_MIPS_ARCH_MIPS32RX',
591 ['mips_arch_variant=="loongson"', {
593 '_MIPS_ARCH_LOONGSON',
600 }], #_toolset=="target
601 ['_toolset=="host"', {
603 ['mips_arch_variant=="rx"', {
605 '_MIPS_ARCH_MIPS32RX',
609 ['mips_arch_variant=="r6"', {
611 '_MIPS_ARCH_MIPS32R6',
615 ['mips_arch_variant=="r2"', {
617 ['mips_fpu_mode=="fp64"', {
619 '_MIPS_ARCH_MIPS32R2',
623 ['mips_fpu_mode=="fpxx"', {
625 '_MIPS_ARCH_MIPS32R2',
629 ['mips_fpu_mode=="fp32"', {
631 '_MIPS_ARCH_MIPS32R2',
637 ['mips_arch_variant=="r1"', {
638 'defines': ['FPU_MODE_FP32',],
640 ['mips_arch_variant=="loongson"', {
642 '_MIPS_ARCH_LOONGSON',
649 }], # v8_target_arch=="mipsel"
650 ['v8_target_arch=="mips64el"', {
652 'V8_TARGET_ARCH_MIPS64',
655 [ 'v8_can_use_fpu_instructions=="true"', {
657 'CAN_USE_FPU_INSTRUCTIONS',
660 [ 'v8_use_mips_abi_hardfloat=="true"', {
662 '__mips_hard_float=1',
663 'CAN_USE_FPU_INSTRUCTIONS',
667 '__mips_soft_float=1'
671 'target_conditions': [
672 ['_toolset=="target"', {
674 ['v8_target_arch==target_arch and android_webview_build==0', {
678 [ 'v8_use_mips_abi_hardfloat=="true"', {
679 'cflags': ['-mhard-float'],
680 'ldflags': ['-mhard-float'],
682 'cflags': ['-msoft-float'],
683 'ldflags': ['-msoft-float'],
685 ['mips_arch_variant=="r6"', {
686 'defines': ['_MIPS_ARCH_MIPS64R6',],
687 'cflags': ['-mips64r6', '-mabi=64', '-Wa,-mips64r6'],
689 '-mips64r6', '-mabi=64',
690 '-Wl,--dynamic-linker=$(LDSO_PATH)',
691 '-Wl,--rpath=$(LD_R_PATH)',
694 ['mips_arch_variant=="r2"', {
695 'defines': ['_MIPS_ARCH_MIPS64R2',],
696 'cflags': ['-mips64r2', '-mabi=64', '-Wa,-mips64r2'],
698 '-mips64r2', '-mabi=64',
699 '-Wl,--dynamic-linker=$(LDSO_PATH)',
700 '-Wl,--rpath=$(LD_R_PATH)',
705 # 'v8_target_arch!=target_arch'
706 # Target not built with an MIPS CXX compiler (simulator build).
708 ['mips_arch_variant=="r6"', {
709 'defines': ['_MIPS_ARCH_MIPS64R6',],
711 ['mips_arch_variant=="r2"', {
712 'defines': ['_MIPS_ARCH_MIPS64R2',],
717 }], #'_toolset=="target"
718 ['_toolset=="host"', {
720 ['mips_arch_variant=="r6"', {
721 'defines': ['_MIPS_ARCH_MIPS64R6',],
723 ['mips_arch_variant=="r2"', {
724 'defines': ['_MIPS_ARCH_MIPS64R2',],
727 }], #'_toolset=="host"
729 }], # v8_target_arch=="mips64el"
730 ['v8_target_arch=="x64"', {
732 'V8_TARGET_ARCH_X64',
735 'ARCHS': [ 'x86_64' ],
739 'StackReserveSize': '2097152',
742 'msvs_configuration_platform': 'x64',
743 }], # v8_target_arch=="x64"
744 ['v8_target_arch=="x32"', {
746 # x32 port shares the source code with x64 port.
747 'V8_TARGET_ARCH_X64',
748 'V8_TARGET_ARCH_32_BIT',
752 # Inhibit warning if long long type is used.
758 }], # v8_target_arch=="x32"
763 # 4351: VS 2005 and later are warning us that they've fixed a bug
764 # present in VS 2003 and earlier.
765 'msvs_disabled_warnings': [4351],
766 'msvs_configuration_attributes': {
767 'OutputDirectory': '<(DEPTH)\\build\\$(ConfigurationName)',
768 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)',
772 ['OS=="win" and v8_target_arch=="ia32"', {
774 'VCCLCompilerTool': {
775 # Ensure no surprising artifacts from 80bit double math with x86.
776 'AdditionalOptions': ['/arch:SSE2'],
780 ['OS=="win" and v8_enable_prof==1', {
783 'GenerateMapFile': 'true',
787 ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
788 or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
789 (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
790 v8_target_arch=="x87" or v8_target_arch=="mips" or \
791 v8_target_arch=="mipsel")', {
792 'target_conditions': [
793 ['_toolset=="host"', {
795 ['host_cxx_is_biarch==1', {
796 'cflags': [ '-m32' ],
797 'ldflags': [ '-m32' ]
804 ['_toolset=="target"', {
806 ['target_cxx_is_biarch==1 and nacl_target_arch!="nacl_x64"', {
807 'cflags': [ '-m32' ],
808 'ldflags': [ '-m32' ],
810 # Enable feedback-directed optimisation when building in android.
811 [ 'android_webview_build == 1', {
812 'aosp_build_settings': {
813 'LOCAL_FDO_SUPPORT': 'true',
823 ['(OS=="linux" or OS=="android") and \
824 (v8_target_arch=="x64" or v8_target_arch=="arm64")', {
825 'target_conditions': [
826 ['_toolset=="host"', {
828 ['host_cxx_is_biarch==1', {
829 'cflags': [ '-m64' ],
830 'ldflags': [ '-m64' ]
834 ['_toolset=="target"', {
836 ['target_cxx_is_biarch==1', {
837 'cflags': [ '-m64' ],
838 'ldflags': [ '-m64' ],
840 # Enable feedback-directed optimisation when building in android.
841 [ 'android_webview_build == 1', {
842 'aosp_build_settings': {
843 'LOCAL_FDO_SUPPORT': 'true',
850 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
851 or OS=="netbsd" or OS=="qnx"', {
853 [ 'v8_no_strict_aliasing==1', {
854 'cflags': [ '-fno-strict-aliasing' ],
859 'defines': [ '__C99FEATURES__=1' ], # isinf() etc.
861 ['OS=="freebsd" or OS=="openbsd"', {
862 'cflags': [ '-I/usr/local/include' ],
865 'cflags': [ '-I/usr/pkg/include' ],
869 # Abstract configuration for v8_optimized_debug == 0.
873 'VCCLCompilerTool': {
876 ['component=="shared_library"', {
877 'RuntimeLibrary': '3', # /MDd
879 'RuntimeLibrary': '1', # /MTd
884 'LinkIncremental': '2',
888 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
898 '-ffunction-sections',
903 'GCC_OPTIMIZATION_LEVEL': '0', # -O0
908 # Abstract configuration for v8_optimized_debug == 1.
912 'VCCLCompilerTool': {
914 'InlineFunctionExpansion': '2',
915 'EnableIntrinsicFunctions': 'true',
916 'FavorSizeOrSpeed': '0',
917 'StringPooling': 'true',
918 'BasicRuntimeChecks': '0',
920 ['component=="shared_library"', {
921 'RuntimeLibrary': '3', # /MDd
923 'RuntimeLibrary': '1', # /MTd
928 'LinkIncremental': '2',
932 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
936 '-O3', # TODO(2807) should be -O1.
942 '-ffunction-sections',
943 '-O1', # TODO(2807) should be -O3.
946 ['gcc_version==44 and clang==0', {
948 # Avoid crashes with gcc 4.4 in the v8 test suite.
956 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
957 'GCC_STRICT_ALIASING': 'YES',
962 # Abstract configuration for v8_optimized_debug == 2.
966 'VCCLCompilerTool': {
968 'InlineFunctionExpansion': '2',
969 'EnableIntrinsicFunctions': 'true',
970 'FavorSizeOrSpeed': '0',
971 'StringPooling': 'true',
972 'BasicRuntimeChecks': '0',
974 ['component=="shared_library"', {
975 'RuntimeLibrary': '3', #/MDd
977 'RuntimeLibrary': '1', #/MTd
982 'LinkIncremental': '1',
983 'OptimizeReferences': '2',
984 'EnableCOMDATFolding': '2',
988 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
997 '-ffunction-sections',
1003 # TODO(crbug.com/272548): Avoid -O3 in NaCl
1004 ['nacl_target_arch=="none"', {
1011 ['gcc_version==44 and clang==0', {
1013 # Avoid crashes with gcc 4.4 in the v8 test suite.
1021 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
1022 'GCC_STRICT_ALIASING': 'YES',
1027 # Common settings for the Debug configuration.
1028 'DebugBaseCommon': {
1031 'ENABLE_DISASSEMBLER',
1038 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd" or \
1040 'cflags': [ '-Woverloaded-virtual', '<(wno_array_bounds)', ],
1042 ['OS=="linux" and v8_enable_backtrace==1', {
1043 # Support for backtrace_symbols.
1044 'ldflags': [ '-rdynamic' ],
1048 'android_full_debug%': 1,
1051 ['android_full_debug==0', {
1052 # Disable full debug if we want a faster v8 in a debug build.
1053 # TODO(2304): pass DISABLE_DEBUG_ASSERT instead of hiding DEBUG.
1061 }, # DebugBaseCommon
1063 'inherit_from': ['DebugBaseCommon'],
1065 ['v8_optimized_debug==0', {
1066 'inherit_from': ['DebugBase0'],
1068 ['v8_optimized_debug==1', {
1069 'inherit_from': ['DebugBase1'],
1071 ['v8_optimized_debug==2', {
1072 'inherit_from': ['DebugBase2'],
1078 ['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="netbsd"', {
1084 '-ffunction-sections',
1085 '<(wno_array_bounds)',
1088 [ 'gcc_version==44 and clang==0', {
1090 # Avoid crashes with gcc 4.4 in the v8 test suite.
1094 # TODO(crbug.com/272548): Avoid -O3 in NaCl
1095 ['nacl_target_arch=="none"', {
1111 '-ffunction-sections',
1115 [ 'gcc_version==44 and clang==0', {
1117 # Avoid crashes with gcc 4.4 in the v8 test suite.
1125 'GCC_OPTIMIZATION_LEVEL': '3', # -O3
1127 # -fstrict-aliasing. Mainline gcc
1128 # enables this at -O2 and above,
1129 # but Apple gcc does not unless it
1130 # is specified explicitly.
1131 'GCC_STRICT_ALIASING': 'YES',
1136 'VCCLCompilerTool': {
1137 'Optimization': '2',
1138 'InlineFunctionExpansion': '2',
1139 'EnableIntrinsicFunctions': 'true',
1140 'FavorSizeOrSpeed': '0',
1141 'StringPooling': 'true',
1143 ['component=="shared_library"', {
1144 'RuntimeLibrary': '2', #/MD
1146 'RuntimeLibrary': '0', #/MT
1151 'LinkIncremental': '1',
1152 'OptimizeReferences': '2',
1153 'EnableCOMDATFolding': '2',
1160 }, # target_defaults