| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/arm.gni") | 6 import("//build/config/arm.gni") |
| 7 import("//build/config/mips.gni") | 7 import("//build/config/mips.gni") |
| 8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
| 9 | 9 |
| 10 if (is_android) { | 10 if (is_android) { |
| 11 import("//build/config/android/rules.gni") | 11 import("//build/config/android/rules.gni") |
| 12 } | 12 } |
| 13 | 13 |
| 14 # Because standalone V8 builds are not supported, assume this is part of a | 14 # Because standalone V8 builds are not supported, assume this is part of a |
| 15 # Chromium build. | 15 # Chromium build. |
| 16 import("//build_overrides/v8.gni") | 16 import("//build_overrides/v8.gni") |
| 17 | 17 |
| 18 import("snapshot_toolchain.gni") | 18 import("snapshot_toolchain.gni") |
| 19 | 19 |
| 20 declare_args() { | 20 declare_args() { |
| 21 # Enable the snapshot feature, for fast context creation. | 21 # Enable the snapshot feature, for fast context creation. |
| 22 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html | 22 # http://v8project.blogspot.com/2015/09/custom-startup-snapshots.html |
| 23 v8_use_snapshot = true | 23 v8_use_snapshot = true |
| 24 |
| 25 # Similar to vfp but on MIPS. |
| 26 v8_can_use_fpu_instructions = true |
| 27 |
| 28 # Similar to the ARM hard float ABI but on MIPS. |
| 29 v8_use_mips_abi_hardfloat = true |
| 24 } | 30 } |
| 25 | 31 |
| 26 # TODO(jochen): These will need to be user-settable to support standalone V8 | 32 # TODO(jochen): These will need to be user-settable to support standalone V8 |
| 27 # builds. | 33 # builds. |
| 28 v8_deprecation_warnings = false | 34 v8_deprecation_warnings = false |
| 29 v8_enable_disassembler = false | 35 v8_enable_disassembler = false |
| 30 v8_enable_gdbjit = false | 36 v8_enable_gdbjit = false |
| 31 v8_enable_handle_zapping = false | 37 v8_enable_handle_zapping = false |
| 32 v8_enable_i18n_support = true | 38 v8_enable_i18n_support = true |
| 33 v8_enable_verify_heap = false | 39 v8_enable_verify_heap = false |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] | 141 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
| 136 } | 142 } |
| 137 } | 143 } |
| 138 | 144 |
| 139 config("toolchain") { | 145 config("toolchain") { |
| 140 visibility = [ ":*" ] # Only targets in this file can depend on this. | 146 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 141 | 147 |
| 142 defines = [] | 148 defines = [] |
| 143 cflags = [] | 149 cflags = [] |
| 144 | 150 |
| 145 # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el. | |
| 146 | |
| 147 if (v8_target_arch == "arm") { | 151 if (v8_target_arch == "arm") { |
| 148 defines += [ "V8_TARGET_ARCH_ARM" ] | 152 defines += [ "V8_TARGET_ARCH_ARM" ] |
| 149 if (current_cpu == "arm") { | 153 if (arm_version == 7) { |
| 150 if (arm_version == 7) { | 154 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] |
| 151 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] | 155 } |
| 152 } | 156 if (arm_fpu == "vfpv3-d16") { |
| 153 if (arm_fpu == "vfpv3-d16") { | 157 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] |
| 154 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] | 158 } else if (arm_fpu == "vfpv3") { |
| 155 } else if (arm_fpu == "vfpv3") { | |
| 156 defines += [ | |
| 157 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 158 "CAN_USE_VFP32DREGS", | |
| 159 ] | |
| 160 } else if (arm_fpu == "neon") { | |
| 161 defines += [ | |
| 162 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 163 "CAN_USE_VFP32DREGS", | |
| 164 "CAN_USE_NEON", | |
| 165 ] | |
| 166 } | |
| 167 } else { | |
| 168 # These defines ares used for the ARM simulator. | |
| 169 defines += [ | 159 defines += [ |
| 170 "CAN_USE_ARMV7_INSTRUCTIONS", | |
| 171 "CAN_USE_VFP3_INSTRUCTIONS", | 160 "CAN_USE_VFP3_INSTRUCTIONS", |
| 172 "CAN_USE_VFP32DREGS", | 161 "CAN_USE_VFP32DREGS", |
| 173 "USE_EABI_HARDFLOAT=0", | 162 ] |
| 163 } else if (arm_fpu == "neon") { |
| 164 defines += [ |
| 165 "CAN_USE_VFP3_INSTRUCTIONS", |
| 166 "CAN_USE_VFP32DREGS", |
| 167 "CAN_USE_NEON", |
| 174 ] | 168 ] |
| 175 } | 169 } |
| 170 # TODO(jochen): Add support for arm_test_noprobe. |
| 176 | 171 |
| 177 # TODO(jochen): Add support for arm_test_noprobe. | 172 if (current_cpu != "arm") { |
| 173 # These defines ares used for the ARM simulator. |
| 174 if (arm_float_abi == "hard") { |
| 175 defines += [ "USE_EABI_HARDFLOAT=1" ] |
| 176 } else if (arm_float_abi == "softfp") { |
| 177 defines += [ "USE_EABI_HARDFLOAT=0" ] |
| 178 } |
| 179 } |
| 178 } | 180 } |
| 179 if (v8_target_arch == "arm64") { | 181 if (v8_target_arch == "arm64") { |
| 180 defines += [ "V8_TARGET_ARCH_ARM64" ] | 182 defines += [ "V8_TARGET_ARCH_ARM64" ] |
| 181 } | 183 } |
| 184 # TODO(jochen): Add support for mips. |
| 182 if (v8_target_arch == "mipsel") { | 185 if (v8_target_arch == "mipsel") { |
| 183 defines += [ "V8_TARGET_ARCH_MIPS" ] | 186 defines += [ "V8_TARGET_ARCH_MIPS" ] |
| 187 if (v8_can_use_fpu_instructions) { |
| 188 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] |
| 189 } |
| 190 if (v8_use_mips_abi_hardfloat) { |
| 191 defines += [ |
| 192 "__mips_hard_float=1", |
| 193 "CAN_USE_FPU_INSTRUCTIONS", |
| 194 ] |
| 195 } else { |
| 196 defines += [ "__mips_soft_float=1" ] |
| 197 } |
| 198 if (mips_arch_variant == "r6") { |
| 199 defines += [ |
| 200 "_MIPS_ARCH_MIPS32R6", |
| 201 "FPU_MODE_FP64", |
| 202 ] |
| 203 } else if (mips_arch_variant == "r2") { |
| 204 defines += [ "_MIPS_ARCH_MIPS32R2" ] |
| 205 if (mips_fpu_mode == "fp64") { |
| 206 defines += [ "FPU_MODE_FP64" ] |
| 207 } else if (mips_fpu_mode == "fpxx") { |
| 208 defines += [ "FPU_MODE_FPXX" ] |
| 209 } else if (mips_fpu_mode == "fp32") { |
| 210 defines += [ "FPU_MODE_FP32" ] |
| 211 } |
| 212 } else if (mips_arch_variant == "r1") { |
| 213 defines += [ "FPU_MODE_FP32" ] |
| 214 } |
| 215 # TODO(jochen): Add support for mips_arch_variant rx and loongson. |
| 184 } | 216 } |
| 217 # TODO(jochen): Add support for mips64. |
| 185 if (v8_target_arch == "mips64el") { | 218 if (v8_target_arch == "mips64el") { |
| 186 defines += [ "V8_TARGET_ARCH_MIPS64" ] | 219 defines += [ "V8_TARGET_ARCH_MIPS64" ] |
| 220 if (v8_can_use_fpu_instructions) { |
| 221 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] |
| 222 } |
| 223 # TODO(jochen): Add support for big endian host byteorder. |
| 224 defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] |
| 225 if (v8_use_mips_abi_hardfloat) { |
| 226 defines += [ |
| 227 "__mips_hard_float=1", |
| 228 "CAN_USE_FPU_INSTRUCTIONS", |
| 229 ] |
| 230 } else { |
| 231 defines += [ "__mips_soft_float=1" ] |
| 232 } |
| 233 if (mips_arch_variant == "r6") { |
| 234 defines += [ "_MIPS_ARCH_MIPS64R6" ] |
| 235 } else if (mips_arch_variant == "r2") { |
| 236 defines += [ "_MIPS_ARCH_MIPS64R2" ] |
| 237 } |
| 187 } | 238 } |
| 188 if (v8_target_arch == "s390") { | 239 if (v8_target_arch == "s390") { |
| 189 defines += [ "V8_TARGET_ARCH_S390" ] | 240 defines += [ "V8_TARGET_ARCH_S390" ] |
| 190 } | 241 } |
| 191 if (v8_target_arch == "s390x") { | 242 if (v8_target_arch == "s390x") { |
| 192 defines += [ | 243 defines += [ |
| 193 "V8_TARGET_ARCH_S390", | 244 "V8_TARGET_ARCH_S390", |
| 194 "V8_TARGET_ARCH_S390X", | 245 "V8_TARGET_ARCH_S390X", |
| 195 ] | 246 ] |
| 196 } | 247 } |
| (...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2112 | 2163 |
| 2113 configs -= [ "//build/config/compiler:chromium_code" ] | 2164 configs -= [ "//build/config/compiler:chromium_code" ] |
| 2114 configs += [ "//build/config/compiler:no_chromium_code" ] | 2165 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 2115 configs += [ | 2166 configs += [ |
| 2116 ":internal_config", | 2167 ":internal_config", |
| 2117 ":libplatform_config", | 2168 ":libplatform_config", |
| 2118 ":features", | 2169 ":features", |
| 2119 ":toolchain", | 2170 ":toolchain", |
| 2120 ] | 2171 ] |
| 2121 } | 2172 } |
| OLD | NEW |