| OLD | NEW |
| 1 # Copyright 2011 the V8 project authors. All rights reserved. | 1 # Copyright 2011 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| 11 # with the distribution. | 11 # with the distribution. |
| 12 # * Neither the name of Google Inc. nor the names of its | 12 # * Neither the name of Google Inc. nor the names of its |
| 13 # contributors may be used to endorse or promote products derived | 13 # contributors may be used to endorse or promote products derived |
| 14 # from this software without specific prior written permission. | 14 # from this software without specific prior written permission. |
| 15 # | 15 # |
| 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | 16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | 17 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | 18 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | 19 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 20 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 21 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 26 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 { | 28 { |
| 29 'variables': { | 29 'includes': ['../../build/common.gypi'], |
| 30 'use_system_v8%': 0, | |
| 31 'msvs_use_common_release': 0, | |
| 32 'gcc_version%': 'unknown', | |
| 33 'v8_compress_startup_data%': 'off', | |
| 34 'v8_target_arch%': '<(target_arch)', | |
| 35 | |
| 36 # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code | |
| 37 # generated by V8 to do unaligned memory access, and setting it to 'false' | |
| 38 # will ensure that the generated code will always do aligned memory | |
| 39 # accesses. The default value of 'default' will try to determine the correct | |
| 40 # setting. Note that for Intel architectures (ia32 and x64) unaligned memory | |
| 41 # access is allowed for all CPUs. | |
| 42 'v8_can_use_unaligned_accesses%': 'default', | |
| 43 | |
| 44 # Setting 'v8_can_use_vfp_instructions' to 'true' will enable use of ARM VFP | |
| 45 # instructions in the V8 generated code. VFP instructions will be enabled | |
| 46 # both for the snapshot and for the ARM target. Leaving the default value | |
| 47 # of 'false' will avoid VFP instructions in the snapshot and use CPU feature | |
| 48 # probing when running on the target. | |
| 49 'v8_can_use_vfp_instructions%': 'false', | |
| 50 | |
| 51 # Setting v8_use_arm_eabi_hardfloat to true will turn on V8 support for ARM | |
| 52 # EABI calling convention where double arguments are passed in VFP | |
| 53 # registers. Note that the GCC flag '-mfloat-abi=hard' should be used as | |
| 54 # well when compiling for the ARM target. | |
| 55 'v8_use_arm_eabi_hardfloat%': 'false', | |
| 56 | |
| 57 'v8_enable_debugger_support%': 1, | |
| 58 | |
| 59 # Chrome needs this definition unconditionally. For standalone V8 builds, | |
| 60 # it's handled in common.gypi. | |
| 61 'want_separate_host_toolset%': 1, | |
| 62 | |
| 63 'v8_use_snapshot%': 'true', | |
| 64 'host_os%': '<(OS)', | |
| 65 'v8_use_liveobjectlist%': 'false', | |
| 66 }, | |
| 67 'conditions': [ | 30 'conditions': [ |
| 68 ['use_system_v8==0', { | 31 ['use_system_v8==0', { |
| 69 'target_defaults': { | |
| 70 'conditions': [ | |
| 71 ['v8_enable_debugger_support==1', { | |
| 72 'defines': ['ENABLE_DEBUGGER_SUPPORT',], | |
| 73 }, | |
| 74 ], | |
| 75 ['OS!="mac"', { | |
| 76 # TODO(mark): The OS!="mac" conditional is temporary. It can be | |
| 77 # removed once the Mac Chromium build stops setting target_arch to | |
| 78 # ia32 and instead sets it to mac. Other checks in this file for | |
| 79 # OS=="mac" can be removed at that time as well. This can be cleaned | |
| 80 # up once http://crbug.com/44205 is fixed. | |
| 81 'conditions': [ | |
| 82 ['v8_target_arch=="arm"', { | |
| 83 'defines': [ | |
| 84 'V8_TARGET_ARCH_ARM', | |
| 85 ], | |
| 86 'conditions': [ | |
| 87 [ 'v8_can_use_unaligned_accesses=="true"', { | |
| 88 'defines': [ | |
| 89 'CAN_USE_UNALIGNED_ACCESSES=1', | |
| 90 ], | |
| 91 }], | |
| 92 [ 'v8_can_use_unaligned_accesses=="false"', { | |
| 93 'defines': [ | |
| 94 'CAN_USE_UNALIGNED_ACCESSES=0', | |
| 95 ], | |
| 96 }], | |
| 97 [ 'v8_can_use_vfp_instructions=="true"', { | |
| 98 'defines': [ | |
| 99 'CAN_USE_VFP_INSTRUCTIONS', | |
| 100 ], | |
| 101 }], | |
| 102 [ 'v8_use_arm_eabi_hardfloat=="true"', { | |
| 103 'defines': [ | |
| 104 'USE_EABI_HARDFLOAT=1', | |
| 105 'CAN_USE_VFP_INSTRUCTIONS', | |
| 106 ], | |
| 107 'cflags': [ | |
| 108 '-mfloat-abi=hard', | |
| 109 ], | |
| 110 }, { | |
| 111 'defines': [ | |
| 112 'USE_EABI_HARDFLOAT=0', | |
| 113 ], | |
| 114 }], | |
| 115 # The ARM assembler assumes the host is 32 bits, | |
| 116 # so force building 32-bit host tools. | |
| 117 [ 'host_arch=="x64"', { | |
| 118 'cflags': ['-m32'], | |
| 119 'ldflags': ['-m32'], | |
| 120 }], | |
| 121 ], | |
| 122 }], | |
| 123 ['v8_target_arch=="ia32"', { | |
| 124 'defines': [ | |
| 125 'V8_TARGET_ARCH_IA32', | |
| 126 ], | |
| 127 }], | |
| 128 ['v8_target_arch=="x64"', { | |
| 129 'defines': [ | |
| 130 'V8_TARGET_ARCH_X64', | |
| 131 ], | |
| 132 }], | |
| 133 ], | |
| 134 }], | |
| 135 ['v8_use_liveobjectlist=="true"', { | |
| 136 'defines': [ | |
| 137 'ENABLE_DEBUGGER_SUPPORT', | |
| 138 'INSPECTOR', | |
| 139 'OBJECT_PRINT', | |
| 140 'LIVEOBJECTLIST', | |
| 141 ], | |
| 142 }], | |
| 143 ['v8_compress_startup_data=="bz2"', { | |
| 144 'defines': [ | |
| 145 'COMPRESS_STARTUP_DATA_BZ2', | |
| 146 ], | |
| 147 }], | |
| 148 ], | |
| 149 'configurations': { | |
| 150 'Debug': { | |
| 151 'defines': [ | |
| 152 'DEBUG', | |
| 153 '_DEBUG', | |
| 154 'ENABLE_DISASSEMBLER', | |
| 155 'V8_ENABLE_CHECKS', | |
| 156 'OBJECT_PRINT', | |
| 157 ], | |
| 158 'msvs_settings': { | |
| 159 'VCCLCompilerTool': { | |
| 160 'Optimization': '0', | |
| 161 | |
| 162 'conditions': [ | |
| 163 ['OS=="win" and component=="shared_library"', { | |
| 164 'RuntimeLibrary': '3', # /MDd | |
| 165 }, { | |
| 166 'RuntimeLibrary': '1', # /MTd | |
| 167 }], | |
| 168 ], | |
| 169 }, | |
| 170 'VCLinkerTool': { | |
| 171 'LinkIncremental': '2', | |
| 172 # For future reference, the stack size needs to be increased | |
| 173 # when building for Windows 64-bit, otherwise some test cases | |
| 174 # can cause stack overflow. | |
| 175 # 'StackReserveSize': '297152', | |
| 176 }, | |
| 177 }, | |
| 178 'conditions': [ | |
| 179 ['OS=="freebsd" or OS=="openbsd"', { | |
| 180 'cflags': [ '-I/usr/local/include' ], | |
| 181 }], | |
| 182 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { | |
| 183 'cflags': [ '-Wall', '-Werror', '-W', '-Wno-unused-parameter', | |
| 184 '-Wnon-virtual-dtor' ], | |
| 185 }], | |
| 186 ], | |
| 187 }, | |
| 188 'Release': { | |
| 189 'conditions': [ | |
| 190 ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { | |
| 191 'cflags!': [ | |
| 192 '-O2', | |
| 193 '-Os', | |
| 194 ], | |
| 195 'cflags': [ | |
| 196 '-fomit-frame-pointer', | |
| 197 '-O3', | |
| 198 ], | |
| 199 'conditions': [ | |
| 200 [ 'gcc_version==44', { | |
| 201 'cflags': [ | |
| 202 # Avoid crashes with gcc 4.4 in the v8 test suite. | |
| 203 '-fno-tree-vrp', | |
| 204 ], | |
| 205 }], | |
| 206 ], | |
| 207 }], | |
| 208 ['OS=="freebsd" or OS=="openbsd"', { | |
| 209 'cflags': [ '-I/usr/local/include' ], | |
| 210 }], | |
| 211 ['OS=="mac"', { | |
| 212 'xcode_settings': { | |
| 213 'GCC_OPTIMIZATION_LEVEL': '3', # -O3 | |
| 214 | |
| 215 # -fstrict-aliasing. Mainline gcc | |
| 216 # enables this at -O2 and above, | |
| 217 # but Apple gcc does not unless it | |
| 218 # is specified explicitly. | |
| 219 'GCC_STRICT_ALIASING': 'YES', | |
| 220 }, | |
| 221 }], | |
| 222 ['OS=="win"', { | |
| 223 'msvs_configuration_attributes': { | |
| 224 'OutputDirectory': '$(SolutionDir)$(ConfigurationName)', | |
| 225 'IntermediateDirectory': '$(OutDir)\\obj\\$(ProjectName)', | |
| 226 'CharacterSet': '1', | |
| 227 }, | |
| 228 'msvs_settings': { | |
| 229 'VCCLCompilerTool': { | |
| 230 'Optimization': '2', | |
| 231 'InlineFunctionExpansion': '2', | |
| 232 'EnableIntrinsicFunctions': 'true', | |
| 233 'FavorSizeOrSpeed': '0', | |
| 234 'OmitFramePointers': 'true', | |
| 235 'StringPooling': 'true', | |
| 236 | |
| 237 'conditions': [ | |
| 238 ['OS=="win" and component=="shared_library"', { | |
| 239 'RuntimeLibrary': '2', #/MD | |
| 240 }, { | |
| 241 'RuntimeLibrary': '0', #/MT | |
| 242 }], | |
| 243 ], | |
| 244 }, | |
| 245 'VCLinkerTool': { | |
| 246 'LinkIncremental': '1', | |
| 247 'OptimizeReferences': '2', | |
| 248 'OptimizeForWindows98': '1', | |
| 249 'EnableCOMDATFolding': '2', | |
| 250 # For future reference, the stack size needs to be | |
| 251 # increased when building for Windows 64-bit, otherwise | |
| 252 # some test cases can cause stack overflow. | |
| 253 # 'StackReserveSize': '297152', | |
| 254 }, | |
| 255 }, | |
| 256 }], | |
| 257 ], | |
| 258 }, | |
| 259 }, | |
| 260 }, | |
| 261 'targets': [ | 32 'targets': [ |
| 262 { | 33 { |
| 263 'target_name': 'v8', | 34 'target_name': 'v8', |
| 264 'conditions': [ | 35 'conditions': [ |
| 265 ['want_separate_host_toolset==1', { | 36 ['want_separate_host_toolset==1', { |
| 266 'toolsets': ['host', 'target'], | 37 'toolsets': ['host', 'target'], |
| 267 }, { | 38 }, { |
| 268 'toolsets': ['target'], | 39 'toolsets': ['target'], |
| 269 }], | 40 }], |
| 270 ['v8_use_snapshot=="true"', { | 41 ['v8_use_snapshot=="true"', { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 'actions': [ | 132 'actions': [ |
| 362 { | 133 { |
| 363 'action_name': 'run_mksnapshot', | 134 'action_name': 'run_mksnapshot', |
| 364 'inputs': [ | 135 'inputs': [ |
| 365 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFI
X)', | 136 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)mksnapshot<(EXECUTABLE_SUFFI
X)', |
| 366 ], | 137 ], |
| 367 'outputs': [ | 138 'outputs': [ |
| 368 '<(INTERMEDIATE_DIR)/snapshot.cc', | 139 '<(INTERMEDIATE_DIR)/snapshot.cc', |
| 369 ], | 140 ], |
| 370 'variables': { | 141 'variables': { |
| 371 'mksnapshot_flags': [], | 142 'mksnapshot_flags': [ |
| 143 '--log-snapshot-positions', |
| 144 '--logfile', '<(INTERMEDIATE_DIR)/snapshot.log', |
| 145 ], |
| 372 }, | 146 }, |
| 373 'conditions': [ | 147 'conditions': [ |
| 374 ['v8_target_arch=="arm"', { | 148 ['v8_target_arch=="arm"', { |
| 375 # The following rules should be consistent with chromium's | 149 # The following rules should be consistent with chromium's |
| 376 # common.gypi and V8's runtime rule to ensure they all generat
e | 150 # common.gypi and V8's runtime rule to ensure they all generat
e |
| 377 # the same correct machine code. The following issue is about | 151 # the same correct machine code. The following issue is about |
| 378 # V8's runtime rule about vfpv3 and neon: | 152 # V8's runtime rule about vfpv3 and neon: |
| 379 # http://code.google.com/p/v8/issues/detail?id=914 | 153 # http://code.google.com/p/v8/issues/detail?id=914 |
| 380 'conditions': [ | 154 'conditions': [ |
| 381 ['armv7==1', { | 155 ['armv7==1', { |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 '../../src/char-predicates-inl.h', | 250 '../../src/char-predicates-inl.h', |
| 477 '../../src/char-predicates.h', | 251 '../../src/char-predicates.h', |
| 478 '../../src/checks.cc', | 252 '../../src/checks.cc', |
| 479 '../../src/checks.h', | 253 '../../src/checks.h', |
| 480 '../../src/circular-queue-inl.h', | 254 '../../src/circular-queue-inl.h', |
| 481 '../../src/circular-queue.cc', | 255 '../../src/circular-queue.cc', |
| 482 '../../src/circular-queue.h', | 256 '../../src/circular-queue.h', |
| 483 '../../src/code-stubs.cc', | 257 '../../src/code-stubs.cc', |
| 484 '../../src/code-stubs.h', | 258 '../../src/code-stubs.h', |
| 485 '../../src/code.h', | 259 '../../src/code.h', |
| 486 '../../src/codegen-inl.h', | |
| 487 '../../src/codegen.cc', | 260 '../../src/codegen.cc', |
| 488 '../../src/codegen.h', | 261 '../../src/codegen.h', |
| 489 '../../src/compilation-cache.cc', | 262 '../../src/compilation-cache.cc', |
| 490 '../../src/compilation-cache.h', | 263 '../../src/compilation-cache.h', |
| 491 '../../src/compiler.cc', | 264 '../../src/compiler.cc', |
| 492 '../../src/compiler.h', | 265 '../../src/compiler.h', |
| 493 '../../src/contexts.cc', | 266 '../../src/contexts.cc', |
| 494 '../../src/contexts.h', | 267 '../../src/contexts.h', |
| 495 '../../src/conversions-inl.h', | 268 '../../src/conversions-inl.h', |
| 496 '../../src/conversions.cc', | 269 '../../src/conversions.cc', |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 ], | 749 ], |
| 977 'conditions': [ | 750 'conditions': [ |
| 978 ['want_separate_host_toolset==1', { | 751 ['want_separate_host_toolset==1', { |
| 979 'toolsets': ['host'], | 752 'toolsets': ['host'], |
| 980 }, { | 753 }, { |
| 981 'toolsets': ['target'], | 754 'toolsets': ['target'], |
| 982 }], | 755 }], |
| 983 ['v8_compress_startup_data=="bz2"', { | 756 ['v8_compress_startup_data=="bz2"', { |
| 984 'libraries': [ | 757 'libraries': [ |
| 985 '-lbz2', | 758 '-lbz2', |
| 986 ]}], | 759 ]} |
| 987 ] | 760 ], |
| 761 ], |
| 988 }, | 762 }, |
| 989 { | 763 { |
| 990 'target_name': 'v8_shell', | 764 'target_name': 'v8_shell', |
| 991 'type': 'executable', | 765 'type': 'executable', |
| 992 'dependencies': [ | 766 'dependencies': [ |
| 993 'v8' | 767 'v8' |
| 994 ], | 768 ], |
| 995 'sources': [ | 769 'sources': [ |
| 996 '../../samples/shell.cc', | 770 '../../samples/shell.cc', |
| 997 ], | 771 ], |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1038 'targets': [ | 812 'targets': [ |
| 1039 { | 813 { |
| 1040 'target_name': 'v8', | 814 'target_name': 'v8', |
| 1041 'type': 'settings', | 815 'type': 'settings', |
| 1042 'conditions': [ | 816 'conditions': [ |
| 1043 ['want_separate_host_toolset==1', { | 817 ['want_separate_host_toolset==1', { |
| 1044 'toolsets': ['host', 'target'], | 818 'toolsets': ['host', 'target'], |
| 1045 }, { | 819 }, { |
| 1046 'toolsets': ['target'], | 820 'toolsets': ['target'], |
| 1047 }], | 821 }], |
| 1048 | |
| 1049 ], | 822 ], |
| 1050 'link_settings': { | 823 'link_settings': { |
| 1051 'libraries': [ | 824 'libraries': [ |
| 1052 '-lv8', | 825 '-lv8', |
| 1053 ], | 826 ], |
| 1054 }, | 827 }, |
| 1055 }, | 828 }, |
| 1056 { | 829 { |
| 1057 'target_name': 'v8_shell', | 830 'target_name': 'v8_shell', |
| 1058 'type': 'none', | 831 'type': 'none', |
| 1059 'conditions': [ | 832 'conditions': [ |
| 1060 ['want_separate_host_toolset==1', { | 833 ['want_separate_host_toolset==1', { |
| 1061 'toolsets': ['host'], | 834 'toolsets': ['host'], |
| 1062 }, { | 835 }, { |
| 1063 'toolsets': ['target'], | 836 'toolsets': ['target'], |
| 1064 }], | 837 }], |
| 1065 ], | 838 ], |
| 1066 'dependencies': [ | 839 'dependencies': [ |
| 1067 'v8' | 840 'v8' |
| 1068 ], | 841 ], |
| 1069 }, | 842 }, |
| 1070 ], | 843 ], |
| 1071 }], | 844 }], |
| 1072 ], | 845 ], |
| 1073 } | 846 } |
| OLD | NEW |