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_use_external_startup_data = false |
19 v8_enable_extra_checks = is_debug | 20 v8_enable_extra_checks = is_debug |
20 v8_target_arch = cpu_arch | 21 v8_target_arch = cpu_arch |
21 v8_random_seed = "314159265" | 22 v8_random_seed = "314159265" |
22 | 23 |
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. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 if (v8_enable_extra_checks == true) { | 103 if (v8_enable_extra_checks == true) { |
103 defines += [ | 104 defines += [ |
104 "ENABLE_EXTRA_CHECKS", | 105 "ENABLE_EXTRA_CHECKS", |
105 ] | 106 ] |
106 } | 107 } |
107 if (v8_enable_handle_zapping == true) { | 108 if (v8_enable_handle_zapping == true) { |
108 defines += [ | 109 defines += [ |
109 "ENABLE_HANDLE_ZAPPING", | 110 "ENABLE_HANDLE_ZAPPING", |
110 ] | 111 ] |
111 } | 112 } |
| 113 if (v8_use_external_startup_data == true) { |
| 114 defines += [ |
| 115 "V8_USE_EXTERNAL_STARTUP_DATA", |
| 116 ] |
| 117 } |
112 } | 118 } |
113 | 119 |
114 config("toolchain") { | 120 config("toolchain") { |
115 visibility = ":*" # Only targets in this file can depend on this. | 121 visibility = ":*" # Only targets in this file can depend on this. |
116 | 122 |
117 defines = [] | 123 defines = [] |
118 cflags = [] | 124 cflags = [] |
119 | 125 |
120 # TODO(jochen): Add support for arm, mips, mipsel. | 126 # TODO(jochen): Add support for arm, mips, mipsel. |
121 | 127 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 ] | 211 ] |
206 | 212 |
207 outputs = [ | 213 outputs = [ |
208 "$target_gen_dir/libraries.cc" | 214 "$target_gen_dir/libraries.cc" |
209 ] | 215 ] |
210 | 216 |
211 if (v8_enable_i18n_support) { | 217 if (v8_enable_i18n_support) { |
212 sources += [ "src/i18n.js" ] | 218 sources += [ "src/i18n.js" ] |
213 } | 219 } |
214 | 220 |
215 args = | 221 args = [ |
216 rebase_path(outputs, root_build_dir) + | 222 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), |
217 [ "CORE", v8_compress_startup_data ] + | 223 "CORE", |
218 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 } |
219 } | 234 } |
220 | 235 |
221 action("js2c_experimental") { | 236 action("js2c_experimental") { |
222 visibility = ":*" # Only targets in this file can depend on this. | 237 visibility = ":*" # Only targets in this file can depend on this. |
223 | 238 |
224 script = "tools/js2c.py" | 239 script = "tools/js2c.py" |
225 | 240 |
226 # 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 |
227 # changes. | 242 # changes. |
228 source_prereqs = [ "tools/jsmin.py" ] | 243 source_prereqs = [ "tools/jsmin.py" ] |
229 | 244 |
230 sources = [ | 245 sources = [ |
231 "src/macros.py", | 246 "src/macros.py", |
232 "src/symbol.js", | 247 "src/symbol.js", |
233 "src/proxy.js", | 248 "src/proxy.js", |
234 "src/collection.js", | 249 "src/collection.js", |
235 "src/collection-iterator.js", | 250 "src/collection-iterator.js", |
236 "src/generator.js", | 251 "src/generator.js", |
237 "src/array-iterator.js", | 252 "src/array-iterator.js", |
238 "src/harmony-string.js", | 253 "src/harmony-string.js", |
239 "src/harmony-array.js", | 254 "src/harmony-array.js", |
240 "src/harmony-math.js", | 255 "src/harmony-math.js", |
241 ] | 256 ] |
242 | 257 |
243 outputs = [ | 258 outputs = [ |
244 "$target_gen_dir/experimental-libraries.cc" | 259 "$target_gen_dir/experimental-libraries.cc" |
245 ] | 260 ] |
246 | 261 |
247 args = | 262 args = [ |
248 rebase_path(outputs, root_build_dir) + | 263 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir), |
249 [ "EXPERIMENTAL", v8_compress_startup_data ] + | 264 "EXPERIMENTAL", |
250 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 if (v8_use_external_startup_data) { |
| 278 action("natives_blob") { |
| 279 visibility = ":*" # Only targets in this file can depend on this. |
| 280 |
| 281 deps = [ |
| 282 ":js2c", |
| 283 ":js2c_experimental" |
| 284 ] |
| 285 |
| 286 sources = [ |
| 287 "$target_gen_dir/libraries.bin", |
| 288 "$target_gen_dir/libraries_experimental.bin" |
| 289 ] |
| 290 |
| 291 outputs = [ |
| 292 "$root_gen_dir/natives_blob.bin" |
| 293 ] |
| 294 |
| 295 script = "tools/concatenate-files.py" |
| 296 |
| 297 args = rebase_path(sources + outputs, root_build_dir) |
| 298 } |
251 } | 299 } |
252 | 300 |
253 action("postmortem-metadata") { | 301 action("postmortem-metadata") { |
254 visibility = ":*" # Only targets in this file can depend on this. | 302 visibility = ":*" # Only targets in this file can depend on this. |
255 | 303 |
256 script = "tools/gen-postmortem-metadata.py" | 304 script = "tools/gen-postmortem-metadata.py" |
257 | 305 |
258 sources = [ | 306 sources = [ |
259 "src/objects.h", | 307 "src/objects.h", |
260 "src/objects-inl.h", | 308 "src/objects-inl.h", |
(...skipping 17 matching lines...) Expand all Loading... |
278 | 326 |
279 outputs = [ | 327 outputs = [ |
280 "$target_gen_dir/snapshot.cc" | 328 "$target_gen_dir/snapshot.cc" |
281 ] | 329 ] |
282 | 330 |
283 args = [ | 331 args = [ |
284 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | 332 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", |
285 "root_out_dir") + "/mksnapshot", | 333 "root_out_dir") + "/mksnapshot", |
286 root_build_dir), | 334 root_build_dir), |
287 "--log-snapshot-positions", | 335 "--log-snapshot-positions", |
288 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir) | 336 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir), |
| 337 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir) |
289 ] | 338 ] |
290 | 339 |
291 if (v8_random_seed != "0") { | 340 if (v8_random_seed != "0") { |
292 args += [ "--random-seed", v8_random_seed ] | 341 args += [ "--random-seed", v8_random_seed ] |
293 } | 342 } |
294 | 343 |
295 args += rebase_path(outputs, root_build_dir) | 344 if (v8_use_external_startup_data) { |
| 345 outputs += [ "$root_gen_dir/snapshot_blob.bin" ] |
| 346 args += [ |
| 347 "--startup_blob", |
| 348 rebase_path("$root_gen_dir/snapshot_blob.bin", root_build_dir) |
| 349 ] |
| 350 } |
296 } | 351 } |
297 | 352 |
298 | 353 |
299 ############################################################################### | 354 ############################################################################### |
300 # Source Sets (aka static libraries) | 355 # Source Sets (aka static libraries) |
301 # | 356 # |
302 | 357 |
303 source_set("v8_nosnapshot") { | 358 source_set("v8_nosnapshot") { |
304 visibility = ":*" # Only targets in this file can depend on this. | 359 visibility = ":*" # Only targets in this file can depend on this. |
305 | 360 |
306 deps = [ | 361 deps = [ |
307 ":js2c", | 362 ":js2c", |
308 ":js2c_experimental", | 363 ":js2c_experimental", |
309 ":generate_trig_table", | 364 ":generate_trig_table", |
310 ":v8_base", | 365 ":v8_base", |
311 ] | 366 ] |
312 | 367 |
313 sources = [ | 368 sources = [ |
314 "$target_gen_dir/libraries.cc", | 369 "$target_gen_dir/libraries.cc", |
315 "$target_gen_dir/experimental-libraries.cc", | 370 "$target_gen_dir/experimental-libraries.cc", |
316 "$target_gen_dir/trig-table.cc", | 371 "$target_gen_dir/trig-table.cc", |
317 "src/snapshot-empty.cc", | 372 "src/snapshot-empty.cc", |
| 373 "src/snapshot-common.cc", |
318 ] | 374 ] |
319 | 375 |
320 configs -= [ "//build/config/compiler:chromium_code" ] | 376 configs -= [ "//build/config/compiler:chromium_code" ] |
321 configs += [ "//build/config/compiler:no_chromium_code" ] | 377 configs += [ "//build/config/compiler:no_chromium_code" ] |
322 configs += [ ":internal_config", ":features", ":toolchain" ] | 378 configs += [ ":internal_config", ":features", ":toolchain" ] |
323 } | 379 } |
324 | 380 |
325 source_set("v8_snapshot") { | 381 source_set("v8_snapshot") { |
326 visibility = ":*" # Only targets in this file can depend on this. | 382 visibility = ":*" # Only targets in this file can depend on this. |
327 | 383 |
328 deps = [ | 384 deps = [ |
329 ":js2c", | 385 ":js2c", |
330 ":js2c_experimental", | 386 ":js2c_experimental", |
331 ":generate_trig_table", | 387 ":generate_trig_table", |
332 ":run_mksnapshot", | 388 ":run_mksnapshot", |
333 ":v8_base", | 389 ":v8_base", |
334 ] | 390 ] |
335 | 391 |
336 sources = [ | 392 sources = [ |
337 "$target_gen_dir/libraries.cc", | 393 "$target_gen_dir/libraries.cc", |
338 "$target_gen_dir/experimental-libraries.cc", | 394 "$target_gen_dir/experimental-libraries.cc", |
339 "$target_gen_dir/trig-table.cc", | 395 "$target_gen_dir/trig-table.cc", |
340 "$target_gen_dir/snapshot.cc", | 396 "$target_gen_dir/snapshot.cc", |
| 397 "src/snapshot-common.cc", |
341 ] | 398 ] |
342 | 399 |
343 configs -= [ "//build/config/compiler:chromium_code" ] | 400 configs -= [ "//build/config/compiler:chromium_code" ] |
344 configs += [ "//build/config/compiler:no_chromium_code" ] | 401 configs += [ "//build/config/compiler:no_chromium_code" ] |
345 configs += [ ":internal_config", ":features", ":toolchain" ] | 402 configs += [ ":internal_config", ":features", ":toolchain" ] |
346 } | 403 } |
347 | 404 |
| 405 if (v8_use_external_startup_data) { |
| 406 source_set("v8_external_snapshot") { |
| 407 visibility = ":*" # Only targets in this file can depend on this. |
| 408 |
| 409 deps = [ |
| 410 ":js2c", |
| 411 ":js2c_experimental", |
| 412 ":generate_trig_table", |
| 413 ":run_mksnapshot", |
| 414 ":v8_base", |
| 415 ":natives_blob", |
| 416 ] |
| 417 |
| 418 sources = [ |
| 419 "$target_gen_dir/trig-table.cc", |
| 420 "src/natives-external.cc", |
| 421 "src/snapshot-external.cc", |
| 422 ] |
| 423 |
| 424 configs -= [ "//build/config/compiler:chromium_code" ] |
| 425 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 426 configs += [ ":internal_config", ":features", ":toolchain" ] |
| 427 } |
| 428 } |
| 429 |
348 source_set("v8_base") { | 430 source_set("v8_base") { |
349 visibility = ":*" # Only targets in this file can depend on this. | 431 visibility = ":*" # Only targets in this file can depend on this. |
350 | 432 |
351 sources = [ | 433 sources = [ |
352 "src/accessors.cc", | 434 "src/accessors.cc", |
353 "src/accessors.h", | 435 "src/accessors.h", |
354 "src/allocation.cc", | 436 "src/allocation.cc", |
355 "src/allocation.h", | 437 "src/allocation.h", |
356 "src/allocation-site-scopes.cc", | 438 "src/allocation-site-scopes.cc", |
357 "src/allocation-site-scopes.h", | 439 "src/allocation-site-scopes.h", |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 "src/scanner.cc", | 723 "src/scanner.cc", |
642 "src/scanner.h", | 724 "src/scanner.h", |
643 "src/scopeinfo.cc", | 725 "src/scopeinfo.cc", |
644 "src/scopeinfo.h", | 726 "src/scopeinfo.h", |
645 "src/scopes.cc", | 727 "src/scopes.cc", |
646 "src/scopes.h", | 728 "src/scopes.h", |
647 "src/serialize.cc", | 729 "src/serialize.cc", |
648 "src/serialize.h", | 730 "src/serialize.h", |
649 "src/small-pointer-list.h", | 731 "src/small-pointer-list.h", |
650 "src/smart-pointers.h", | 732 "src/smart-pointers.h", |
651 "src/snapshot-common.cc", | 733 "src/snapshot-source-sink.cc", |
| 734 "src/snapshot-source-sink.h", |
652 "src/snapshot.h", | 735 "src/snapshot.h", |
653 "src/spaces-inl.h", | 736 "src/spaces-inl.h", |
654 "src/spaces.cc", | 737 "src/spaces.cc", |
655 "src/spaces.h", | 738 "src/spaces.h", |
656 "src/store-buffer-inl.h", | 739 "src/store-buffer-inl.h", |
657 "src/store-buffer.cc", | 740 "src/store-buffer.cc", |
658 "src/store-buffer.h", | 741 "src/store-buffer.h", |
659 "src/string-search.cc", | 742 "src/string-search.cc", |
660 "src/string-search.h", | 743 "src/string-search.h", |
661 "src/string-stream.cc", | 744 "src/string-stream.cc", |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 # Public targets | 1100 # Public targets |
1018 # | 1101 # |
1019 | 1102 |
1020 if (component_mode == "shared_library") { | 1103 if (component_mode == "shared_library") { |
1021 | 1104 |
1022 component("v8") { | 1105 component("v8") { |
1023 sources = [ | 1106 sources = [ |
1024 "src/v8dll-main.cc", | 1107 "src/v8dll-main.cc", |
1025 ] | 1108 ] |
1026 | 1109 |
1027 if (v8_use_snapshot) { | 1110 if (v8_use_external_startup_data) { |
| 1111 deps = [ |
| 1112 ":v8_base", |
| 1113 ":v8_external_snapshot", |
| 1114 ] |
| 1115 } else if (v8_use_snapshot) { |
1028 deps = [ | 1116 deps = [ |
1029 ":v8_base", | 1117 ":v8_base", |
1030 ":v8_snapshot", | 1118 ":v8_snapshot", |
1031 ] | 1119 ] |
1032 } else { | 1120 } else { |
1033 deps = [ | 1121 deps = [ |
1034 ":v8_base", | 1122 ":v8_base", |
1035 ":v8_nosnapshot", | 1123 ":v8_nosnapshot", |
1036 ] | 1124 ] |
1037 } | 1125 } |
1038 | 1126 |
1039 configs -= [ "//build/config/compiler:chromium_code" ] | 1127 configs -= [ "//build/config/compiler:chromium_code" ] |
1040 configs += [ "//build/config/compiler:no_chromium_code" ] | 1128 configs += [ "//build/config/compiler:no_chromium_code" ] |
1041 configs += [ ":internal_config", ":features", ":toolchain" ] | 1129 configs += [ ":internal_config", ":features", ":toolchain" ] |
1042 | 1130 |
1043 direct_dependent_configs = [ ":external_config" ] | 1131 direct_dependent_configs = [ ":external_config" ] |
1044 | 1132 |
1045 if (is_android && current_toolchain != host_toolchain) { | 1133 if (is_android && current_toolchain != host_toolchain) { |
1046 libs += [ "log" ] | 1134 libs += [ "log" ] |
1047 } | 1135 } |
1048 } | 1136 } |
1049 | 1137 |
1050 } else { | 1138 } else { |
1051 | 1139 |
1052 group("v8") { | 1140 group("v8") { |
1053 if (v8_use_snapshot) { | 1141 if (v8_use_external_startup_data) { |
| 1142 deps = [ |
| 1143 ":v8_base", |
| 1144 ":v8_external_snapshot", |
| 1145 ] |
| 1146 } else if (v8_use_snapshot) { |
1054 deps = [ | 1147 deps = [ |
1055 ":v8_base", | 1148 ":v8_base", |
1056 ":v8_snapshot", | 1149 ":v8_snapshot", |
1057 ] | 1150 ] |
1058 } else { | 1151 } else { |
1059 deps = [ | 1152 deps = [ |
1060 ":v8_base", | 1153 ":v8_base", |
1061 ":v8_nosnapshot", | 1154 ":v8_nosnapshot", |
1062 ] | 1155 ] |
1063 } | 1156 } |
1064 | 1157 |
1065 direct_dependent_configs = [ ":external_config" ] | 1158 direct_dependent_configs = [ ":external_config" ] |
1066 } | 1159 } |
1067 | 1160 |
1068 } | 1161 } |
OLD | NEW |