Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Side by Side Diff: BUILD.gn

Issue 991023002: gn build changes for v8 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enable_correct_v8_arch Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Because standalone V8 builds are not supported, assume this is part of a 5 # Because standalone V8 builds are not supported, assume this is part of a
6 # Chromium build. 6 # Chromium build.
7 import("//build/module_args/v8.gni") 7 import("//build/module_args/v8.gni")
8 8
9 # TODO(jochen): These will need to be user-settable to support standalone V8 9 # TODO(jochen): These will need to be user-settable to support standalone V8
10 # builds. 10 # builds.
11 v8_deprecation_warnings = false 11 v8_deprecation_warnings = false
12 v8_enable_disassembler = false 12 v8_enable_disassembler = false
13 v8_enable_gdbjit = false 13 v8_enable_gdbjit = false
14 v8_enable_handle_zapping = true 14 v8_enable_handle_zapping = true
15 v8_enable_i18n_support = true 15 v8_enable_i18n_support = true
16 v8_enable_verify_heap = false 16 v8_enable_verify_heap = false
17 v8_interpreted_regexp = false 17 v8_interpreted_regexp = false
18 v8_object_print = false 18 v8_object_print = false
19 v8_postmortem_support = false 19 v8_postmortem_support = false
20 v8_use_snapshot = true 20 v8_use_snapshot = true
21 v8_target_arch = current_cpu 21 v8_target_arch = current_cpu
22 if (enable_correct_v8_arch) {
23 v8_target_arch = target_cpu
24 }
22 v8_random_seed = "314159265" 25 v8_random_seed = "314159265"
23 v8_toolset_for_d8 = "host" 26 v8_toolset_for_d8 = "host"
24 27
25 ############################################################################### 28 ###############################################################################
26 # Configurations 29 # Configurations
27 # 30 #
28 config("internal_config") { 31 config("internal_config") {
29 visibility = [ ":*" ] # Only targets in this file can depend on this. 32 visibility = [ ":*" ] # Only targets in this file can depend on this.
30 33
31 include_dirs = [ "." ] 34 include_dirs = [ "." ]
(...skipping 17 matching lines...) Expand all
49 config("external_config") { 52 config("external_config") {
50 if (is_component_build) { 53 if (is_component_build) {
51 defines = [ 54 defines = [
52 "V8_SHARED", 55 "V8_SHARED",
53 "USING_V8_SHARED", 56 "USING_V8_SHARED",
54 ] 57 ]
55 } 58 }
56 include_dirs = [ "include" ] 59 include_dirs = [ "include" ]
57 } 60 }
58 61
62 declare_args() {
63 host_cxx_is_biarch = 0
64 if (enable_correct_v8_arch &&
65 (host_cpu == "ia32" || host_cpu =="x64" || host_cpu=="ppc" ||
66 host_cpu=="ppc64" || is_clang)) {
67 host_cxx_is_biarch = 1
68 }
69 }
70
59 config("features") { 71 config("features") {
60 visibility = [ ":*" ] # Only targets in this file can depend on this. 72 visibility = [ ":*" ] # Only targets in this file can depend on this.
61 73
62 defines = [] 74 defines = []
63 75
64 if (v8_enable_disassembler == true) { 76 if (v8_enable_disassembler == true) {
65 defines += [ "ENABLE_DISASSEMBLER" ] 77 defines += [ "ENABLE_DISASSEMBLER" ]
66 } 78 }
67 if (v8_enable_gdbjit == true) { 79 if (v8_enable_gdbjit == true) {
68 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] 80 defines += [ "ENABLE_GDB_JIT_INTERFACE" ]
(...skipping 19 matching lines...) Expand all
88 if (v8_use_external_startup_data == true) { 100 if (v8_use_external_startup_data == true) {
89 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] 101 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ]
90 } 102 }
91 } 103 }
92 104
93 config("toolchain") { 105 config("toolchain") {
94 visibility = [ ":*" ] # Only targets in this file can depend on this. 106 visibility = [ ":*" ] # Only targets in this file can depend on this.
95 107
96 defines = [] 108 defines = []
97 cflags = [] 109 cflags = []
110 ldflags = []
98 111
99 # TODO(jochen): Add support for arm subarchs, mips, mipsel. 112 # TODO(jochen): Add support for arm subarchs, mips, mipsel.
100 113
101 if (v8_target_arch == "arm") { 114 if (v8_target_arch == "arm") {
102 defines += [ "V8_TARGET_ARCH_ARM" ] 115 defines += [ "V8_TARGET_ARCH_ARM" ]
103 if (arm_version == 7) { 116 if (arm_version == 7) {
104 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ] 117 defines += [ "CAN_USE_ARMV7_INSTRUCTIONS" ]
105 } 118 }
106 if (arm_fpu == "vfpv3-d16") { 119 if (arm_fpu == "vfpv3-d16") {
107 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ] 120 defines += [ "CAN_USE_VFP3_INSTRUCTIONS" ]
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 # TODO(jochen): Add support for different debug optimization levels. 157 # TODO(jochen): Add support for different debug optimization levels.
145 defines += [ 158 defines += [
146 "ENABLE_DISASSEMBLER", 159 "ENABLE_DISASSEMBLER",
147 "V8_ENABLE_CHECKS", 160 "V8_ENABLE_CHECKS",
148 "OBJECT_PRINT", 161 "OBJECT_PRINT",
149 "VERIFY_HEAP", 162 "VERIFY_HEAP",
150 "DEBUG", 163 "DEBUG",
151 "OPTIMIZED_DEBUG", 164 "OPTIMIZED_DEBUG",
152 ] 165 ]
153 } 166 }
167
168 if ((current_os == "linux" || current_os == "freebsd" ||
169 current_os == "openbsd" || current_os == "solaris" ||
170 current_os == "netbsd" || current_os == "mac" ||
171 current_os == "android" || current_os == "qnx") &&
172 (v8_target_arch == "arm" || v8_target_arch == "ia32" ||
173 v8_target_arch == "x87" || v8_target_arch == "mips" ||
174 v8_target_arch == "mipsel" || v8_target_arch == "ppc")) {
175 if (current_toolchain == host_toolchain) {
176 if (host_cxx_is_biarch == 1) {
177 cflags += [ "-m32" ]
178 ldflags += [ "-m32" ]
179 }
180 }
181 }
154 } 182 }
155 183
156 ############################################################################### 184 ###############################################################################
157 # Actions 185 # Actions
158 # 186 #
159 187
160 action("js2c") { 188 action("js2c") {
161 visibility = [ ":*" ] # Only targets in this file can depend on this. 189 visibility = [ ":*" ] # Only targets in this file can depend on this.
162 190
163 script = "tools/js2c.py" 191 script = "tools/js2c.py"
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1557 sources += [ 1585 sources += [
1558 "src/d8-debug.cc", 1586 "src/d8-debug.cc",
1559 "$target_gen_dir/d8-js.cc", 1587 "$target_gen_dir/d8-js.cc",
1560 ] 1588 ]
1561 } 1589 }
1562 if (v8_enable_i18n_support) { 1590 if (v8_enable_i18n_support) {
1563 deps += [ "//third_party/icu" ] 1591 deps += [ "//third_party/icu" ]
1564 } 1592 }
1565 } 1593 }
1566 } 1594 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698