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 # TODO(jochen): These will need to be user-settable to support standalone V8 | 5 # TODO(jochen): These will need to be user-settable to support standalone V8 |
| 6 # builds. | 6 # builds. |
| 7 v8_compress_startup_data = "off" | 7 v8_compress_startup_data = "off" |
| 8 v8_deprecation_warnings = false | 8 v8_deprecation_warnings = false |
| 9 v8_enable_disassembler = false | 9 v8_enable_disassembler = false |
| 10 v8_enable_gdbjit = false | 10 v8_enable_gdbjit = false |
| 11 v8_enable_handle_zapping = true | 11 v8_enable_handle_zapping = true |
| 12 v8_enable_i18n_support = true | 12 v8_enable_i18n_support = true |
| 13 v8_enable_verify_heap = false | 13 v8_enable_verify_heap = false |
| 14 v8_interpreted_regexp = false | 14 v8_interpreted_regexp = false |
| 15 v8_object_print = false | 15 v8_object_print = false |
| 16 v8_postmortem_support = false | 16 v8_postmortem_support = false |
| 17 v8_use_default_platform = true | 17 v8_use_default_platform = true |
| 18 #v8_use_snapshot = true | 18 v8_use_snapshot = true |
| 19 v8_enable_extra_checks = is_debug | 19 v8_enable_extra_checks = is_debug |
| 20 v8_target_arch = cpu_arch | 20 v8_target_arch = cpu_arch |
| 21 v8_random_seed = "314159265" | |
| 21 | 22 |
| 22 | 23 |
| 23 ############################################################################### | 24 ############################################################################### |
| 24 # Configurations | 25 # Configurations |
| 25 # | 26 # |
| 26 config("internal_config") { | 27 config("internal_config") { |
| 27 visibility = ":*" # Only targets in this file can depend on this. | 28 visibility = ":*" # Only targets in this file can depend on this. |
| 28 | 29 |
| 29 include_dirs = [ "src" ] | 30 include_dirs = [ "src" ] |
| 30 | 31 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 | 249 |
| 249 outputs = [ | 250 outputs = [ |
| 250 "$target_gen_dir/debug-support.cc" | 251 "$target_gen_dir/debug-support.cc" |
| 251 ] | 252 ] |
| 252 | 253 |
| 253 args = | 254 args = |
| 254 rebase_path(outputs, root_build_dir) + | 255 rebase_path(outputs, root_build_dir) + |
| 255 rebase_path(sources, root_build_dir) | 256 rebase_path(sources, root_build_dir) |
| 256 } | 257 } |
| 257 | 258 |
| 259 action("run_mksnapshot") { | |
| 260 visibility = ":*" # Only targets in this file can depend on this. | |
| 261 | |
| 262 deps = [ ":mksnapshot($host_toolchain)" ] | |
| 263 | |
| 264 script = "tools/run.py" | |
| 265 | |
| 266 outputs = [ | |
| 267 "$target_gen_dir/snapshot.cc" | |
| 268 ] | |
| 269 | |
| 270 args = [ | |
| 271 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | |
| 272 "root_out_dir") + "/mksnapshot", | |
| 273 root_build_dir), | |
| 274 "--log-snapshot-positions", | |
| 275 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir) | |
| 276 ] | |
| 277 | |
| 278 if (v8_random_seed != "0") { | |
| 279 args += [ "--random-seed", v8_random_seed ] | |
| 280 } | |
| 281 | |
| 282 args += rebase_path(outputs, root_build_dir) | |
| 283 } | |
| 284 | |
| 285 | |
| 258 ############################################################################### | 286 ############################################################################### |
| 259 # Source Sets (aka static libraries) | 287 # Source Sets (aka static libraries) |
| 260 # | 288 # |
| 261 | 289 |
| 262 source_set("v8_nosnapshot") { | 290 source_set("v8_nosnapshot") { |
| 263 visibility = ":*" # Only targets in this file can depend on this. | 291 visibility = ":*" # Only targets in this file can depend on this. |
| 264 | 292 |
| 265 deps = [ | 293 deps = [ |
| 266 ":js2c", | 294 ":js2c", |
| 267 ":js2c_experimental", | 295 ":js2c_experimental", |
| 268 ":generate_trig_table", | 296 ":generate_trig_table", |
| 269 ":v8_base", | 297 ":v8_base", |
| 270 ] | 298 ] |
| 271 | 299 |
| 272 sources = [ | 300 sources = [ |
| 273 "$target_gen_dir/libraries.cc", | 301 "$target_gen_dir/libraries.cc", |
| 274 "$target_gen_dir/experimental-libraries.cc", | 302 "$target_gen_dir/experimental-libraries.cc", |
| 275 "$target_gen_dir/trig-table.cc", | 303 "$target_gen_dir/trig-table.cc", |
| 276 "src/snapshot-empty.cc", | 304 "src/snapshot-empty.cc", |
| 277 ] | 305 ] |
| 278 | 306 |
| 279 configs -= [ "//build/config/compiler:chromium_code" ] | 307 configs -= [ "//build/config/compiler:chromium_code" ] |
| 280 configs += [ "//build/config/compiler:no_chromium_code" ] | 308 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 281 configs += [ ":internal_config", ":features", ":toolchain" ] | 309 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 282 } | 310 } |
| 283 | 311 |
| 312 source_set("v8_snapshot") { | |
| 313 visibility = ":*" # Only targets in this file can depend on this. | |
| 314 | |
| 315 deps = [ | |
| 316 ":js2c", | |
| 317 ":js2c_experimental", | |
| 318 ":generate_trig_table", | |
| 319 ":run_mksnapshot", | |
| 320 ":v8_base", | |
| 321 ] | |
| 322 | |
| 323 sources = [ | |
| 324 "$target_gen_dir/libraries.cc", | |
| 325 "$target_gen_dir/experimental-libraries.cc", | |
| 326 "$target_gen_dir/trig-table.cc", | |
| 327 "$target_gen_dir/snapshot.cc", | |
| 328 ] | |
| 329 | |
| 330 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 331 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 332 configs += [ ":internal_config", ":features", ":toolchain" ] | |
| 333 } | |
| 334 | |
| 284 source_set("v8_base") { | 335 source_set("v8_base") { |
| 285 visibility = ":*" # Only targets in this file can depend on this. | 336 visibility = ":*" # Only targets in this file can depend on this. |
| 286 | 337 |
| 287 sources = [ | 338 sources = [ |
| 288 "src/accessors.cc", | 339 "src/accessors.cc", |
| 289 "src/accessors.h", | 340 "src/accessors.h", |
| 290 "src/allocation.cc", | 341 "src/allocation.cc", |
| 291 "src/allocation.h", | 342 "src/allocation.h", |
| 292 "src/allocation-site-scopes.cc", | 343 "src/allocation-site-scopes.cc", |
| 293 "src/allocation-site-scopes.h", | 344 "src/allocation-site-scopes.h", |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 898 | 949 |
| 899 configs -= [ "//build/config/compiler:chromium_code" ] | 950 configs -= [ "//build/config/compiler:chromium_code" ] |
| 900 configs += [ "//build/config/compiler:no_chromium_code" ] | 951 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 901 configs += [ ":internal_config", ":features", ":toolchain" ] | 952 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 902 } | 953 } |
| 903 | 954 |
| 904 ############################################################################### | 955 ############################################################################### |
| 905 # Executables | 956 # Executables |
| 906 # | 957 # |
| 907 | 958 |
| 908 if (current_toolchain != host_toolchain && is_android) { | 959 executable("mksnapshot") { |
| 960 visibility = ":*" # Only targets in this file can depend on this. | |
| 909 | 961 |
| 910 source_set("mksnapshot") { | |
| 911 sources = [ | |
| 912 ] | |
| 913 } | |
| 914 | |
| 915 } else { | |
| 916 | |
| 917 executable("mksnapshot") { | |
| 918 sources = [ | 962 sources = [ |
| 919 "src/mksnapshot.cc", | 963 "src/mksnapshot.cc", |
| 920 ] | 964 ] |
| 921 | 965 |
| 922 configs -= [ "//build/config/compiler:chromium_code" ] | 966 configs -= [ "//build/config/compiler:chromium_code" ] |
| 923 configs += [ "//build/config/compiler:no_chromium_code" ] | 967 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 924 configs += [ ":internal_config", ":features", ":toolchain" ] | 968 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 925 | 969 |
| 926 deps = [ | 970 deps = [ |
| 927 ":v8_base", | 971 ":v8_base", |
| 928 ":v8_nosnapshot", | 972 ":v8_nosnapshot", |
| 929 ] | 973 ] |
| 930 | 974 |
| 931 if (v8_compress_startup_data == "bz2") { | 975 if (v8_compress_startup_data == "bz2") { |
| 932 libs = [ "bz2" ] | 976 libs = [ "bz2" ] |
| 933 } | 977 } |
| 934 } | 978 } |
| 935 | 979 |
| 980 ############################################################################### | |
| 981 # Public targets | |
| 982 # | |
| 983 | |
| 984 if (component_mode == "shared_library") { | |
| 985 | |
| 986 component("v8") { | |
|
brettw
2014/05/27 21:26:23
CAn you indent the stuff inside the if?
| |
| 987 sources = [ | |
| 988 "src/v8dll-main.cc", | |
| 989 ] | |
| 990 | |
| 991 if (v8_use_snapshot) { | |
| 992 deps = [ | |
| 993 ":v8_base", | |
| 994 ":v8_snapshot", | |
| 995 ] | |
| 996 } else { | |
| 997 deps = [ | |
| 998 ":v8_base", | |
| 999 ":v8_nosnapshot", | |
| 1000 ] | |
| 1001 } | |
| 1002 | |
| 1003 if (is_android && current_toolchain != host_toolchain) { | |
| 1004 libs = [ "log" ] | |
| 1005 } | |
| 1006 | |
| 1007 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 1008 configs += [ "//build/config/compiler:no_chromium_code" ] | |
| 1009 configs += [ ":internal_config", ":features", ":toolchain" ] | |
| 1010 | |
| 1011 # TODO(jochen): Support direct dependent configs. | |
| 936 } | 1012 } |
| 1013 | |
| 1014 } else { | |
| 1015 | |
| 1016 group("v8") { | |
| 1017 if (v8_use_snapshot) { | |
| 1018 deps = [ | |
| 1019 ":v8_base", | |
| 1020 ":v8_snapshot", | |
| 1021 ] | |
| 1022 } else { | |
| 1023 deps = [ | |
| 1024 ":v8_base", | |
| 1025 ":v8_nosnapshot", | |
| 1026 ] | |
| 1027 } | |
| 1028 # TODO(jochen): Support direct dependent configs. | |
| 1029 } | |
| 1030 | |
| 1031 } | |
| OLD | NEW |