| 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 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 ] | 211 ] |
| 212 | 212 |
| 213 outputs = [ | 213 outputs = [ |
| 214 "$target_gen_dir/libraries.cc" | 214 "$target_gen_dir/libraries.cc" |
| 215 ] | 215 ] |
| 216 | 216 |
| 217 if (v8_enable_i18n_support) { | 217 if (v8_enable_i18n_support) { |
| 218 sources += [ "src/i18n.js" ] | 218 sources += [ "src/i18n.js" ] |
| 219 } | 219 } |
| 220 | 220 |
| 221 args = | 221 args = [ |
| 222 rebase_path(outputs, root_build_dir) + | 222 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), |
| 223 [ "CORE", v8_compress_startup_data ] + | 223 "CORE", |
| 224 rebase_path(sources, root_build_dir) | 224 v8_compress_startup_data |
| 225 ] + rebase_path(sources, root_build_dir) |
| 226 |
| 227 if (v8_use_external_startup_data) { |
| 228 outputs += [ "$target_gen_dir/libraries.bin" ] |
| 229 args += [ |
| 230 "--startup_blob", |
| 231 rebase_path("$target_gen_dir/libraries.bin", root_build_dir) |
| 232 ] |
| 233 } |
| 225 } | 234 } |
| 226 | 235 |
| 227 action("js2c_experimental") { | 236 action("js2c_experimental") { |
| 228 visibility = ":*" # Only targets in this file can depend on this. | 237 visibility = ":*" # Only targets in this file can depend on this. |
| 229 | 238 |
| 230 script = "tools/js2c.py" | 239 script = "tools/js2c.py" |
| 231 | 240 |
| 232 # The script depends on this other script, this rule causes a rebuild if it | 241 # The script depends on this other script, this rule causes a rebuild if it |
| 233 # changes. | 242 # changes. |
| 234 source_prereqs = [ "tools/jsmin.py" ] | 243 source_prereqs = [ "tools/jsmin.py" ] |
| 235 | 244 |
| 236 sources = [ | 245 sources = [ |
| 237 "src/macros.py", | 246 "src/macros.py", |
| 238 "src/symbol.js", | 247 "src/symbol.js", |
| 239 "src/proxy.js", | 248 "src/proxy.js", |
| 240 "src/collection.js", | 249 "src/collection.js", |
| 241 "src/collection-iterator.js", | 250 "src/collection-iterator.js", |
| 242 "src/generator.js", | 251 "src/generator.js", |
| 243 "src/array-iterator.js", | 252 "src/array-iterator.js", |
| 244 "src/harmony-string.js", | 253 "src/harmony-string.js", |
| 245 "src/harmony-array.js", | 254 "src/harmony-array.js", |
| 246 "src/harmony-math.js", | 255 "src/harmony-math.js", |
| 247 ] | 256 ] |
| 248 | 257 |
| 249 outputs = [ | 258 outputs = [ |
| 250 "$target_gen_dir/experimental-libraries.cc" | 259 "$target_gen_dir/experimental-libraries.cc" |
| 251 ] | 260 ] |
| 252 | 261 |
| 253 args = | 262 args = [ |
| 254 rebase_path(outputs, root_build_dir) + | 263 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir), |
| 255 [ "EXPERIMENTAL", v8_compress_startup_data ] + | 264 "EXPERIMENTAL", |
| 256 rebase_path(sources, root_build_dir) | 265 v8_compress_startup_data |
| 266 ] + rebase_path(sources, root_build_dir) |
| 267 |
| 268 if (v8_use_external_startup_data) { |
| 269 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] |
| 270 args += [ |
| 271 "--startup_blob", |
| 272 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir) |
| 273 ] |
| 274 } |
| 275 } |
| 276 |
| 277 action("natives_blob") { |
| 278 visibility = ":*" # Only targets in this file can depend on this. |
| 279 |
| 280 deps = [ |
| 281 ":js2c", |
| 282 ":js2c_experimental" |
| 283 ] |
| 284 |
| 285 sources = [ |
| 286 "$target_gen_dir/libraries.bin", |
| 287 "$target_gen_dir/libraries_experimental.bin" |
| 288 ] |
| 289 |
| 290 outputs = [ |
| 291 "$root_gen_dir/natives_blob.bin" |
| 292 ] |
| 293 |
| 294 script = "tools/concatenate-files.py" |
| 295 |
| 296 args = rebase_path(sources + outputs, root_build_dir) |
| 257 } | 297 } |
| 258 | 298 |
| 259 action("postmortem-metadata") { | 299 action("postmortem-metadata") { |
| 260 visibility = ":*" # Only targets in this file can depend on this. | 300 visibility = ":*" # Only targets in this file can depend on this. |
| 261 | 301 |
| 262 script = "tools/gen-postmortem-metadata.py" | 302 script = "tools/gen-postmortem-metadata.py" |
| 263 | 303 |
| 264 sources = [ | 304 sources = [ |
| 265 "src/objects.h", | 305 "src/objects.h", |
| 266 "src/objects-inl.h", | 306 "src/objects-inl.h", |
| (...skipping 17 matching lines...) Expand all Loading... |
| 284 | 324 |
| 285 outputs = [ | 325 outputs = [ |
| 286 "$target_gen_dir/snapshot.cc" | 326 "$target_gen_dir/snapshot.cc" |
| 287 ] | 327 ] |
| 288 | 328 |
| 289 args = [ | 329 args = [ |
| 290 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | 330 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", |
| 291 "root_out_dir") + "/mksnapshot", | 331 "root_out_dir") + "/mksnapshot", |
| 292 root_build_dir), | 332 root_build_dir), |
| 293 "--log-snapshot-positions", | 333 "--log-snapshot-positions", |
| 294 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir) | 334 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir), |
| 335 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir) |
| 295 ] | 336 ] |
| 296 | 337 |
| 297 if (v8_random_seed != "0") { | 338 if (v8_random_seed != "0") { |
| 298 args += [ "--random-seed", v8_random_seed ] | 339 args += [ "--random-seed", v8_random_seed ] |
| 299 } | 340 } |
| 300 | 341 |
| 301 args += rebase_path(outputs, root_build_dir) | 342 if (v8_use_external_startup_data) { |
| 343 outputs += [ "$root_gen_dir/snapshot_blob.bin" ] |
| 344 args += [ |
| 345 "--startup_blob", |
| 346 rebase_path("$root_gen_dir/snapshot_blob.bin", root_build_dir) |
| 347 ] |
| 348 } |
| 302 } | 349 } |
| 303 | 350 |
| 304 | 351 |
| 305 ############################################################################### | 352 ############################################################################### |
| 306 # Source Sets (aka static libraries) | 353 # Source Sets (aka static libraries) |
| 307 # | 354 # |
| 308 | 355 |
| 309 source_set("v8_nosnapshot") { | 356 source_set("v8_nosnapshot") { |
| 310 visibility = ":*" # Only targets in this file can depend on this. | 357 visibility = ":*" # Only targets in this file can depend on this. |
| 311 | 358 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 "$target_gen_dir/trig-table.cc", | 393 "$target_gen_dir/trig-table.cc", |
| 347 "$target_gen_dir/snapshot.cc", | 394 "$target_gen_dir/snapshot.cc", |
| 348 "src/snapshot-common.cc", | 395 "src/snapshot-common.cc", |
| 349 ] | 396 ] |
| 350 | 397 |
| 351 configs -= [ "//build/config/compiler:chromium_code" ] | 398 configs -= [ "//build/config/compiler:chromium_code" ] |
| 352 configs += [ "//build/config/compiler:no_chromium_code" ] | 399 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 353 configs += [ ":internal_config", ":features", ":toolchain" ] | 400 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 354 } | 401 } |
| 355 | 402 |
| 403 source_set("v8_external_snapshot") { |
| 404 visibility = ":*" # Only targets in this file can depend on this. |
| 405 |
| 406 deps = [ |
| 407 ":js2c", |
| 408 ":js2c_experimental", |
| 409 ":generate_trig_table", |
| 410 ":run_mksnapshot", |
| 411 ":v8_base", |
| 412 ":natives_blob", |
| 413 ] |
| 414 |
| 415 sources = [ |
| 416 "$target_gen_dir/trig-table.cc", |
| 417 "src/natives-external.cc", |
| 418 "src/snapshot-external.cc", |
| 419 ] |
| 420 |
| 421 configs -= [ "//build/config/compiler:chromium_code" ] |
| 422 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 423 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 424 } |
| 425 |
| 356 source_set("v8_base") { | 426 source_set("v8_base") { |
| 357 visibility = ":*" # Only targets in this file can depend on this. | 427 visibility = ":*" # Only targets in this file can depend on this. |
| 358 | 428 |
| 359 sources = [ | 429 sources = [ |
| 360 "src/accessors.cc", | 430 "src/accessors.cc", |
| 361 "src/accessors.h", | 431 "src/accessors.h", |
| 362 "src/allocation.cc", | 432 "src/allocation.cc", |
| 363 "src/allocation.h", | 433 "src/allocation.h", |
| 364 "src/allocation-site-scopes.cc", | 434 "src/allocation-site-scopes.cc", |
| 365 "src/allocation-site-scopes.h", | 435 "src/allocation-site-scopes.h", |
| (...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1017 # Public targets | 1087 # Public targets |
| 1018 # | 1088 # |
| 1019 | 1089 |
| 1020 if (component_mode == "shared_library") { | 1090 if (component_mode == "shared_library") { |
| 1021 | 1091 |
| 1022 component("v8") { | 1092 component("v8") { |
| 1023 sources = [ | 1093 sources = [ |
| 1024 "src/v8dll-main.cc", | 1094 "src/v8dll-main.cc", |
| 1025 ] | 1095 ] |
| 1026 | 1096 |
| 1027 if (v8_use_snapshot) { | 1097 if (v8_use_external_startup_data) { |
| 1098 deps = [ |
| 1099 ":v8_base", |
| 1100 ":v8_external_snapshot", |
| 1101 ] |
| 1102 } else if (v8_use_snapshot) { |
| 1028 deps = [ | 1103 deps = [ |
| 1029 ":v8_base", | 1104 ":v8_base", |
| 1030 ":v8_snapshot", | 1105 ":v8_snapshot", |
| 1031 ] | 1106 ] |
| 1032 } else { | 1107 } else { |
| 1033 deps = [ | 1108 deps = [ |
| 1034 ":v8_base", | 1109 ":v8_base", |
| 1035 ":v8_nosnapshot", | 1110 ":v8_nosnapshot", |
| 1036 ] | 1111 ] |
| 1037 } | 1112 } |
| 1038 | 1113 |
| 1039 configs -= [ "//build/config/compiler:chromium_code" ] | 1114 configs -= [ "//build/config/compiler:chromium_code" ] |
| 1040 configs += [ "//build/config/compiler:no_chromium_code" ] | 1115 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 1041 configs += [ ":internal_config", ":features", ":toolchain" ] | 1116 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 1042 | 1117 |
| 1043 direct_dependent_configs = [ ":external_config" ] | 1118 direct_dependent_configs = [ ":external_config" ] |
| 1044 | 1119 |
| 1045 if (is_android && current_toolchain != host_toolchain) { | 1120 if (is_android && current_toolchain != host_toolchain) { |
| 1046 libs += [ "log" ] | 1121 libs += [ "log" ] |
| 1047 } | 1122 } |
| 1048 } | 1123 } |
| 1049 | 1124 |
| 1050 } else { | 1125 } else { |
| 1051 | 1126 |
| 1052 group("v8") { | 1127 group("v8") { |
| 1053 if (v8_use_snapshot) { | 1128 if (v8_use_external_startup_data) { |
| 1129 deps = [ |
| 1130 ":v8_base", |
| 1131 ":v8_external_snapshot", |
| 1132 ] |
| 1133 } else if (v8_use_snapshot) { |
| 1054 deps = [ | 1134 deps = [ |
| 1055 ":v8_base", | 1135 ":v8_base", |
| 1056 ":v8_snapshot", | 1136 ":v8_snapshot", |
| 1057 ] | 1137 ] |
| 1058 } else { | 1138 } else { |
| 1059 deps = [ | 1139 deps = [ |
| 1060 ":v8_base", | 1140 ":v8_base", |
| 1061 ":v8_nosnapshot", | 1141 ":v8_nosnapshot", |
| 1062 ] | 1142 ] |
| 1063 } | 1143 } |
| 1064 | 1144 |
| 1065 direct_dependent_configs = [ ":external_config" ] | 1145 direct_dependent_configs = [ ":external_config" ] |
| 1066 } | 1146 } |
| 1067 | 1147 |
| 1068 } | 1148 } |
| OLD | NEW |