Chromium Code Reviews| 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) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 # based where the regular expression is compiled to a bytecode. | 48 # based where the regular expression is compiled to a bytecode. |
| 49 v8_interpreted_regexp = false | 49 v8_interpreted_regexp = false |
| 50 | 50 |
| 51 # Sets -dOBJECT_PRINT. | 51 # Sets -dOBJECT_PRINT. |
| 52 v8_object_print = false | 52 v8_object_print = false |
| 53 | 53 |
| 54 # With post mortem support enabled, metadata is embedded into libv8 that | 54 # With post mortem support enabled, metadata is embedded into libv8 that |
| 55 # describes various parameters of the VM for use by debuggers. See | 55 # describes various parameters of the VM for use by debuggers. See |
| 56 # tools/gen-postmortem-metadata.py for details. | 56 # tools/gen-postmortem-metadata.py for details. |
| 57 v8_postmortem_support = false | 57 v8_postmortem_support = false |
| 58 | |
| 59 # Similar to vfp but on MIPS. | |
| 60 v8_can_use_fpu_instructions = true | |
| 61 | |
| 62 # Similar to the ARM hard float ABI but on MIPS. | |
| 63 v8_use_mips_abi_hardfloat = true | |
| 58 } | 64 } |
| 59 | 65 |
| 60 v8_random_seed = "314159265" | 66 v8_random_seed = "314159265" |
| 61 v8_toolset_for_d8 = "host" | 67 v8_toolset_for_d8 = "host" |
| 62 | 68 |
| 63 if (is_msan) { | 69 if (is_msan) { |
| 64 # Running the V8-generated code on an ARM simulator is a powerful hack that | 70 # Running the V8-generated code on an ARM simulator is a powerful hack that |
| 65 # allows the tool to see the memory accesses from JITted code. Without this | 71 # allows the tool to see the memory accesses from JITted code. Without this |
| 66 # flag, JS code causes false positive reports from MSan. | 72 # flag, JS code causes false positive reports from MSan. |
| 67 v8_target_arch = "arm64" | 73 v8_target_arch = "arm64" |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 161 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] | 167 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
| 162 } | 168 } |
| 163 } | 169 } |
| 164 | 170 |
| 165 config("toolchain") { | 171 config("toolchain") { |
| 166 visibility = [ ":*" ] # Only targets in this file can depend on this. | 172 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 167 | 173 |
| 168 defines = [] | 174 defines = [] |
| 169 cflags = [] | 175 cflags = [] |
| 170 | 176 |
| 171 # TODO(jochen): Add support for arm subarchs, mips, mipsel, mips64el. | |
| 172 | |
| 173 if (v8_target_arch == "arm") { | 177 if (v8_target_arch == "arm") { |
| 174 defines += [ "V8_TARGET_ARCH_ARM" ] | 178 defines += [ "V8_TARGET_ARCH_ARM" ] |
| 175 if (current_cpu == "arm") { | 179 if (arm_version == 7) { |
| 176 if (arm_version == 7) { | 180 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] |
| 177 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] | 181 } |
| 178 } | 182 if (arm_fpu == "vfpv3-d16") { |
| 179 if (arm_fpu == "vfpv3-d16") { | 183 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] |
| 180 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] | 184 } else if (arm_fpu == "vfpv3") { |
| 181 } else if (arm_fpu == "vfpv3") { | |
| 182 defines += [ | |
| 183 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 184 "CAN_USE_VFP32DREGS", | |
| 185 ] | |
| 186 } else if (arm_fpu == "neon") { | |
| 187 defines += [ | |
| 188 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 189 "CAN_USE_VFP32DREGS", | |
| 190 "CAN_USE_NEON", | |
| 191 ] | |
| 192 } | |
| 193 } else { | |
| 194 # These defines ares used for the ARM simulator. | |
| 195 defines += [ | 185 defines += [ |
| 196 "CAN_USE_ARMV7_INSTRUCTIONS", | |
| 197 "CAN_USE_VFP3_INSTRUCTIONS", | 186 "CAN_USE_VFP3_INSTRUCTIONS", |
| 198 "CAN_USE_VFP32DREGS", | 187 "CAN_USE_VFP32DREGS", |
| 199 "USE_EABI_HARDFLOAT=0", | 188 ] |
| 189 } else if (arm_fpu == "neon") { | |
| 190 defines += [ | |
| 191 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 192 "CAN_USE_VFP32DREGS", | |
| 193 "CAN_USE_NEON", | |
| 200 ] | 194 ] |
| 201 } | 195 } |
| 196 # TODO(jochen): Add support for arm_test_noprobe. | |
| 202 | 197 |
| 203 # TODO(jochen): Add support for arm_test_noprobe. | 198 if (current_cpu != "arm") { |
| 199 # These defines ares used for the ARM simulator. | |
| 200 if (arm_float_abi == "hard") { | |
| 201 defines += [ "USE_EABI_HARDFLOAT=1" ] | |
| 202 } else if (arm_float_abi == "softfp") { | |
| 203 defines += [ "USE_EABI_HARDFLOAT=0" ] | |
| 204 } | |
| 205 } | |
| 204 } | 206 } |
| 205 if (v8_target_arch == "arm64") { | 207 if (v8_target_arch == "arm64") { |
| 206 defines += [ "V8_TARGET_ARCH_ARM64" ] | 208 defines += [ "V8_TARGET_ARCH_ARM64" ] |
| 207 } | 209 } |
| 210 # TODO(jochen): Add support for mips. | |
| 208 if (v8_target_arch == "mipsel") { | 211 if (v8_target_arch == "mipsel") { |
| 209 defines += [ "V8_TARGET_ARCH_MIPS" ] | 212 defines += [ "V8_TARGET_ARCH_MIPS" ] |
| 213 if (v8_can_use_fpu_instructions) { | |
| 214 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] | |
| 215 } | |
| 216 if (v8_use_mips_abi_hardfloat) { | |
| 217 defines += [ | |
| 218 "__mips_hard_float=1", | |
| 219 "CAN_USE_FPU_INSTRUCTIONS", | |
| 220 ] | |
| 221 } else { | |
| 222 defines += [ "__mips_hard_float=0" ] | |
|
Michael Achenbach
2016/05/02 07:41:35
In toolchain.gypi there is __mips_soft_float=1
| |
| 223 } | |
| 224 if (mips_arch_variant == "r6") { | |
| 225 defines += [ | |
| 226 "_MIPS_ARCH_MIPS32R6", | |
| 227 "FPU_MODE_FP64", | |
| 228 ] | |
| 229 } else if (mips_arch_variant == "r2") { | |
| 230 if (mips_fpu_mode == "fp64") { | |
| 231 defines += [ | |
| 232 "_MIPS_ARCH_MIPS32R2", | |
|
Michael Achenbach
2016/05/02 07:41:35
maybe pull the three _MIPS_ARCH_MIPS32R2 defines o
| |
| 233 "FPU_MODE_FP64", | |
| 234 ] | |
| 235 } else if (mips_fpu_mode == "fpxx") { | |
| 236 defines += [ | |
| 237 "_MIPS_ARCH_MIPS32R2", | |
| 238 "FPU_MODE_FPXX", | |
| 239 ] | |
| 240 } else if (mips_fpu_mode == "fp32") { | |
| 241 defines += [ | |
| 242 "_MIPS_ARCH_MIPS32R2", | |
| 243 "FPU_MODE_FP32", | |
| 244 ] | |
| 245 } | |
| 246 } else if (mips_arch_variant == "r1") { | |
| 247 defines += [ "FPU_MODE_FP32" ] | |
| 248 } | |
| 249 # TODO(jochen): Add support for mips_arch_variant rx and loongson. | |
| 210 } | 250 } |
| 251 # TODO(jochen): Add support for mips64. | |
| 211 if (v8_target_arch == "mips64el") { | 252 if (v8_target_arch == "mips64el") { |
| 212 defines += [ "V8_TARGET_ARCH_MIPS64" ] | 253 defines += [ "V8_TARGET_ARCH_MIPS64" ] |
| 254 if (v8_can_use_fpu_instructions) { | |
| 255 defines += [ "CAN_USE_FPU_INSTRUCTIONS" ] | |
| 256 } | |
| 257 # TODO(jochen): Add support for big endian host byteorder. | |
| 258 defines += [ "V8_TARGET_ARCH_MIPS64_LE" ] | |
| 259 if (v8_use_mips_abi_hardfloat) { | |
| 260 defines += [ | |
| 261 "__mips_hard_float=1", | |
| 262 "CAN_USE_FPU_INSTRUCTIONS", | |
| 263 ] | |
| 264 } else { | |
| 265 defines += [ "__mips_hard_float=0" ] | |
| 266 } | |
| 267 if (mips_arch_variant == "r6") { | |
| 268 defines += [ "_MIPS_ARCH_MIPS64R6" ] | |
| 269 } else if (mips_arch_variant == "r2") { | |
| 270 defines += [ "_MIPS_ARCH_MIPS64R2" ] | |
| 271 } | |
| 213 } | 272 } |
| 214 if (v8_target_arch == "s390") { | 273 if (v8_target_arch == "s390") { |
| 215 defines += [ "V8_TARGET_ARCH_S390" ] | 274 defines += [ "V8_TARGET_ARCH_S390" ] |
| 216 } | 275 } |
| 217 if (v8_target_arch == "s390x") { | 276 if (v8_target_arch == "s390x") { |
| 218 defines += [ | 277 defines += [ |
| 219 "V8_TARGET_ARCH_S390", | 278 "V8_TARGET_ARCH_S390", |
| 220 "V8_TARGET_ARCH_S390X", | 279 "V8_TARGET_ARCH_S390X", |
| 221 ] | 280 ] |
| 222 } | 281 } |
| (...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2161 | 2220 |
| 2162 configs -= [ "//build/config/compiler:chromium_code" ] | 2221 configs -= [ "//build/config/compiler:chromium_code" ] |
| 2163 configs += [ "//build/config/compiler:no_chromium_code" ] | 2222 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 2164 configs += [ | 2223 configs += [ |
| 2165 ":internal_config", | 2224 ":internal_config", |
| 2166 ":libplatform_config", | 2225 ":libplatform_config", |
| 2167 ":features", | 2226 ":features", |
| 2168 ":toolchain", | 2227 ":toolchain", |
| 2169 ] | 2228 ] |
| 2170 } | 2229 } |
| OLD | NEW |