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") | |
| 6 import("//build/config/arm.gni") | |
| 7 import("//build/config/mips.gni") | |
| 8 | |
| 5 # Because standalone V8 builds are not supported, assume this is part of a | 9 # Because standalone V8 builds are not supported, assume this is part of a |
| 6 # Chromium build. | 10 # Chromium build. |
| 7 import("//build/module_args/v8.gni") | 11 import("//build/module_args/v8.gni") |
| 8 | 12 |
| 9 # TODO(jochen): These will need to be user-settable to support standalone V8 | 13 # TODO(jochen): These will need to be user-settable to support standalone V8 |
| 10 # builds. | 14 # builds. |
| 11 v8_deprecation_warnings = false | 15 v8_deprecation_warnings = false |
| 12 v8_enable_disassembler = false | 16 v8_enable_disassembler = false |
| 13 v8_enable_gdbjit = false | 17 v8_enable_gdbjit = false |
| 14 v8_enable_handle_zapping = true | 18 v8_enable_handle_zapping = true |
| 15 v8_enable_i18n_support = true | 19 v8_enable_i18n_support = true |
| 16 v8_enable_verify_heap = false | 20 v8_enable_verify_heap = false |
| 17 v8_interpreted_regexp = false | 21 v8_interpreted_regexp = false |
| 18 v8_object_print = false | 22 v8_object_print = false |
| 19 v8_postmortem_support = false | 23 v8_postmortem_support = false |
| 20 v8_use_snapshot = true | 24 v8_use_snapshot = true |
| 21 | 25 v8_target_arch = target_cpu |
| 22 # TODO(GYP): We should be just target_cpu and not need v8_target_arch. | |
| 23 v8_target_arch = current_cpu | |
| 24 | |
| 25 v8_random_seed = "314159265" | 26 v8_random_seed = "314159265" |
| 26 v8_toolset_for_d8 = "host" | 27 v8_toolset_for_d8 = "host" |
| 27 | 28 |
| 28 # The snapshot needs to be compiled for the host, but compiled with | 29 # The snapshot needs to be compiled for the host, but compiled with |
| 29 # a toolchain that matches the bit-width of the target. | 30 # a toolchain that matches the bit-width of the target. |
| 30 # | 31 # |
| 31 # TODO(GYP): For now we only support 32-bit little-endian target builds from | 32 # TODO(GYP): For now we only support 32-bit little-endian target builds from an |
| 32 # an x86/x64 Linux host. Eventually we need to support all of the | 33 # x64 Linux host. Eventually we need to support all of the host/target |
| 33 # host/target configurations v8 runs on. | 34 # configurations v8 runs on. |
| 34 if (target_os == "android" || target_os == "chromeos") { | 35 if (host_cpu == "x64" && |
| 35 assert(host_os == "linux" && | 36 (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) { |
| 36 (host_cpu == "x86" || host_cpu == "x64") && | 37 assert(host_os == "linux") |
|
Dirk Pranke
2015/03/12 17:53:03
This is definitely simpler and an improvement.
| |
| 37 (target_cpu == "arm" || target_cpu == "mipsel" || target_cpu == "x86")) | |
| 38 snapshot_toolchain = "//build/toolchain/linux:clang_x86" | 38 snapshot_toolchain = "//build/toolchain/linux:clang_x86" |
| 39 } else { | 39 } else { |
| 40 snapshot_toolchain = default_toolchain | 40 snapshot_toolchain = default_toolchain |
| 41 } | 41 } |
| 42 | 42 |
| 43 ############################################################################### | 43 ############################################################################### |
| 44 # Configurations | 44 # Configurations |
| 45 # | 45 # |
| 46 config("internal_config") { | 46 config("internal_config") { |
| 47 visibility = [ ":*" ] # Only targets in this file can depend on this. | 47 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 111 config("toolchain") { | 111 config("toolchain") { |
| 112 visibility = [ ":*" ] # Only targets in this file can depend on this. | 112 visibility = [ ":*" ] # Only targets in this file can depend on this. |
| 113 | 113 |
| 114 defines = [] | 114 defines = [] |
| 115 cflags = [] | 115 cflags = [] |
| 116 | 116 |
| 117 # TODO(jochen): Add support for arm subarchs, mips, mipsel. | 117 # TODO(jochen): Add support for arm subarchs, mips, mipsel. |
| 118 | 118 |
| 119 if (v8_target_arch == "arm") { | 119 if (v8_target_arch == "arm") { |
| 120 defines += [ "V8_TARGET_ARCH_ARM" ] | 120 defines += [ "V8_TARGET_ARCH_ARM" ] |
| 121 if (arm_version == 7) { | 121 if (current_cpu == "arm") { |
| 122 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] | 122 if (arm_version == 7) { |
| 123 } | 123 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] |
| 124 if (arm_fpu == "vfpv3-d16") { | 124 } |
| 125 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] | 125 if (arm_fpu == "vfpv3-d16") { |
| 126 } | 126 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] |
| 127 if (arm_fpu == "vfpv3") { | 127 } |
| 128 if (arm_fpu == "vfpv3") { | |
|
Dirk Pranke
2015/03/12 17:53:03
nit: I'd probably write lines 128 and 134 as 'else
| |
| 129 defines += [ | |
| 130 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 131 "CAN_USE_VFP32DREGS", | |
| 132 ] | |
| 133 } | |
| 134 if (arm_fpu == "neon") { | |
| 135 defines += [ | |
| 136 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 137 "CAN_USE_VFP32DREGS", | |
| 138 "CAN_USE_NEON", | |
| 139 ] | |
| 140 } | |
| 141 } else { | |
| 128 defines += [ | 142 defines += [ |
|
Dirk Pranke
2015/03/12 17:53:03
We only get into this branch when building mksnaps
| |
| 143 "CAN_USE_ARMV7_INSTRUCTIONS", | |
| 129 "CAN_USE_VFP3_INSTRUCTIONS", | 144 "CAN_USE_VFP3_INSTRUCTIONS", |
| 130 "CAN_USE_VFP32DREGS", | 145 "CAN_USE_VFP32DREGS", |
| 131 ] | 146 "USE_EABI_HARDFLOAT=0", |
| 132 } | |
| 133 if (arm_fpu == "neon") { | |
| 134 defines += [ | |
| 135 "CAN_USE_VFP3_INSTRUCTIONS", | |
| 136 "CAN_USE_VFP32DREGS", | |
| 137 "CAN_USE_NEON", | |
| 138 ] | 147 ] |
| 139 } | 148 } |
| 140 | 149 |
| 141 # TODO(jochen): Add support for arm_test_noprobe. | 150 # TODO(jochen): Add support for arm_test_noprobe. |
| 142 | |
| 143 # TODO(jochen): Add support for cpu_arch != v8_target_arch/ | |
| 144 } | 151 } |
| 145 if (v8_target_arch == "arm64") { | 152 if (v8_target_arch == "arm64") { |
| 146 defines += [ "V8_TARGET_ARCH_ARM64" ] | 153 defines += [ "V8_TARGET_ARCH_ARM64" ] |
| 147 } | 154 } |
| 148 if (v8_target_arch == "x86") { | 155 if (v8_target_arch == "x86") { |
| 149 defines += [ "V8_TARGET_ARCH_IA32" ] | 156 defines += [ "V8_TARGET_ARCH_IA32" ] |
| 150 } | 157 } |
| 151 if (v8_target_arch == "x64") { | 158 if (v8_target_arch == "x64") { |
| 152 defines += [ "V8_TARGET_ARCH_X64" ] | 159 defines += [ "V8_TARGET_ARCH_X64" ] |
| 153 } | 160 } |
| (...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1575 sources += [ | 1582 sources += [ |
| 1576 "src/d8-debug.cc", | 1583 "src/d8-debug.cc", |
| 1577 "$target_gen_dir/d8-js.cc", | 1584 "$target_gen_dir/d8-js.cc", |
| 1578 ] | 1585 ] |
| 1579 } | 1586 } |
| 1580 if (v8_enable_i18n_support) { | 1587 if (v8_enable_i18n_support) { |
| 1581 deps += [ "//third_party/icu" ] | 1588 deps += [ "//third_party/icu" ] |
| 1582 } | 1589 } |
| 1583 } | 1590 } |
| 1584 } | 1591 } |
| OLD | NEW |