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

Side by Side Diff: BUILD.gn

Issue 846743004: Add d8 target to BUILD.gn (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 = cpu_arch 21 v8_target_arch = cpu_arch
22 v8_random_seed = "314159265" 22 v8_random_seed = "314159265"
23 v8_toolset_for_d8 = "host"
23 24
24 ############################################################################### 25 ###############################################################################
25 # Configurations 26 # Configurations
26 # 27 #
27 config("internal_config") { 28 config("internal_config") {
28 visibility = [ ":*" ] # Only targets in this file can depend on this. 29 visibility = [ ":*" ] # Only targets in this file can depend on this.
29 30
30 include_dirs = [ "." ] 31 include_dirs = [ "." ]
31 32
32 if (component_mode == "shared_library") { 33 if (component_mode == "shared_library") {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 227
227 if (v8_use_external_startup_data) { 228 if (v8_use_external_startup_data) {
228 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] 229 outputs += [ "$target_gen_dir/libraries_experimental.bin" ]
229 args += [ 230 args += [
230 "--startup_blob", 231 "--startup_blob",
231 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), 232 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir),
232 ] 233 ]
233 } 234 }
234 } 235 }
235 236
237 action("d8_js2c") {
238 visibility = [ ":*" ] # Only targets in this file can depend on this.
239
240 script = "tools/js2c.py"
241
242 inputs = [
243 "src/d8.js",
244 "src/macros.py",
245 ]
246
247 outputs = [
248 "$target_gen_dir/d8-js.cc",
249 ]
250
251 args = rebase_path(outputs, root_build_dir) + [ "D8" ] +
252 rebase_path(inputs, root_build_dir)
253 }
254
236 if (v8_use_external_startup_data) { 255 if (v8_use_external_startup_data) {
237 action("natives_blob") { 256 action("natives_blob") {
238 visibility = [ ":*" ] # Only targets in this file can depend on this. 257 visibility = [ ":*" ] # Only targets in this file can depend on this.
239 258
240 deps = [ 259 deps = [
241 ":js2c", 260 ":js2c",
242 ":js2c_experimental", 261 ":js2c_experimental",
243 ] 262 ]
244 263
245 sources = [ 264 sources = [
(...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 assert(!v8_use_external_startup_data) 1486 assert(!v8_use_external_startup_data)
1468 deps = [ 1487 deps = [
1469 ":v8_base", 1488 ":v8_base",
1470 ":v8_nosnapshot", 1489 ":v8_nosnapshot",
1471 ] 1490 ]
1472 } 1491 }
1473 1492
1474 direct_dependent_configs = [ ":external_config" ] 1493 direct_dependent_configs = [ ":external_config" ]
1475 } 1494 }
1476 } 1495 }
1496
1497 if ((current_toolchain == host_toolchain && v8_toolset_for_d8 == "host") ||
1498 (current_toolchain != host_toolchain && v8_toolset_for_d8 == "target")) {
1499 executable("d8") {
1500 sources = [
1501 "src/d8.cc",
1502 "src/d8.h",
1503 ]
1504
1505 configs -= [ "//build/config/compiler:chromium_code" ]
1506 configs += [ "//build/config/compiler:no_chromium_code" ]
1507 configs += [
1508 ":internal_config",
1509 ":features",
1510 ":toolchain",
1511 ]
1512
1513 deps = [
1514 ":d8_js2c",
1515 ":v8",
1516 ":v8_libplatform",
1517 "//build/config/sanitizers:deps",
1518 ]
1519
1520 # TODO(jochen): Add support for readline and vtunejit.
1521
1522 if (is_posix) {
1523 sources += [ "src/d8-posix.cc" ]
1524 } else if (is_win) {
1525 sources += [ "src/d8-windows.cc" ]
1526 }
1527
1528 if (component_mode != "shared_library") {
1529 sources += [
1530 "src/d8-debug.cc",
1531 "$target_gen_dir/d8-js.cc",
1532 ]
1533 }
1534 if (v8_enable_i18n_support) {
1535 deps += [ "//third_party/icu" ]
1536 }
1537 }
1538 }
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