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_snapshot = true | 17 v8_use_snapshot = true |
18 v8_use_external_startup_data = false | 18 v8_use_external_startup_data = false |
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 v8_random_seed = "314159265" |
22 | 22 |
23 | 23 |
24 ############################################################################### | 24 ############################################################################### |
25 # Configurations | 25 # Configurations |
26 # | 26 # |
27 config("internal_config") { | 27 config("internal_config") { |
28 visibility = ":*" # Only targets in this file can depend on this. | 28 visibility = [ ":*" ] # Only targets in this file can depend on this. |
29 | 29 |
30 include_dirs = [ "." ] | 30 include_dirs = [ "." ] |
31 | 31 |
32 if (component_mode == "shared_library") { | 32 if (component_mode == "shared_library") { |
33 defines = [ | 33 defines = [ |
34 "V8_SHARED", | 34 "V8_SHARED", |
35 "BUILDING_V8_SHARED", | 35 "BUILDING_V8_SHARED", |
36 ] | 36 ] |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 config("internal_config_base") { | 40 config("internal_config_base") { |
41 visibility = ":*" # Only targets in this file can depend on this. | 41 visibility = [ ":*" ] # Only targets in this file can depend on this. |
42 | 42 |
43 include_dirs = [ "." ] | 43 include_dirs = [ "." ] |
44 } | 44 } |
45 | 45 |
46 # This config should only be applied to code using V8 and not any V8 code | 46 # This config should only be applied to code using V8 and not any V8 code |
47 # itself. | 47 # itself. |
48 config("external_config") { | 48 config("external_config") { |
49 if (is_component_build) { | 49 if (is_component_build) { |
50 defines = [ | 50 defines = [ |
51 "V8_SHARED", | 51 "V8_SHARED", |
52 "USING_V8_SHARED", | 52 "USING_V8_SHARED", |
53 ] | 53 ] |
54 } | 54 } |
55 include_dirs = [ "include" ] | 55 include_dirs = [ "include" ] |
56 } | 56 } |
57 | 57 |
58 config("features") { | 58 config("features") { |
59 visibility = ":*" # Only targets in this file can depend on this. | 59 visibility = [ ":*" ] # Only targets in this file can depend on this. |
60 | 60 |
61 defines = [] | 61 defines = [] |
62 | 62 |
63 if (v8_enable_disassembler == true) { | 63 if (v8_enable_disassembler == true) { |
64 defines += [ | 64 defines += [ |
65 "ENABLE_DISASSEMBLER", | 65 "ENABLE_DISASSEMBLER", |
66 ] | 66 ] |
67 } | 67 } |
68 if (v8_enable_gdbjit == true) { | 68 if (v8_enable_gdbjit == true) { |
69 defines += [ | 69 defines += [ |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 ] | 111 ] |
112 } | 112 } |
113 if (v8_use_external_startup_data == true) { | 113 if (v8_use_external_startup_data == true) { |
114 defines += [ | 114 defines += [ |
115 "V8_USE_EXTERNAL_STARTUP_DATA", | 115 "V8_USE_EXTERNAL_STARTUP_DATA", |
116 ] | 116 ] |
117 } | 117 } |
118 } | 118 } |
119 | 119 |
120 config("toolchain") { | 120 config("toolchain") { |
121 visibility = ":*" # Only targets in this file can depend on this. | 121 visibility = [ ":*" ] # Only targets in this file can depend on this. |
122 | 122 |
123 defines = [] | 123 defines = [] |
124 cflags = [] | 124 cflags = [] |
125 | 125 |
126 # TODO(jochen): Add support for arm, mips, mipsel. | 126 # TODO(jochen): Add support for arm, mips, mipsel. |
127 | 127 |
128 if (v8_target_arch == "arm64") { | 128 if (v8_target_arch == "arm64") { |
129 defines += [ | 129 defines += [ |
130 "V8_TARGET_ARCH_ARM64", | 130 "V8_TARGET_ARCH_ARM64", |
131 ] | 131 ] |
(...skipping 28 matching lines...) Expand all Loading... |
160 "OPTIMIZED_DEBUG", | 160 "OPTIMIZED_DEBUG", |
161 ] | 161 ] |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 ############################################################################### | 165 ############################################################################### |
166 # Actions | 166 # Actions |
167 # | 167 # |
168 | 168 |
169 action("js2c") { | 169 action("js2c") { |
170 visibility = ":*" # Only targets in this file can depend on this. | 170 visibility = [ ":*" ] # Only targets in this file can depend on this. |
171 | 171 |
172 script = "tools/js2c.py" | 172 script = "tools/js2c.py" |
173 | 173 |
174 # The script depends on this other script, this rule causes a rebuild if it | 174 # The script depends on this other script, this rule causes a rebuild if it |
175 # changes. | 175 # changes. |
176 source_prereqs = [ "tools/jsmin.py" ] | 176 source_prereqs = [ "tools/jsmin.py" ] |
177 | 177 |
178 sources = [ | 178 sources = [ |
179 "src/runtime.js", | 179 "src/runtime.js", |
180 "src/v8natives.js", | 180 "src/v8natives.js", |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 if (v8_use_external_startup_data) { | 221 if (v8_use_external_startup_data) { |
222 outputs += [ "$target_gen_dir/libraries.bin" ] | 222 outputs += [ "$target_gen_dir/libraries.bin" ] |
223 args += [ | 223 args += [ |
224 "--startup_blob", | 224 "--startup_blob", |
225 rebase_path("$target_gen_dir/libraries.bin", root_build_dir) | 225 rebase_path("$target_gen_dir/libraries.bin", root_build_dir) |
226 ] | 226 ] |
227 } | 227 } |
228 } | 228 } |
229 | 229 |
230 action("js2c_experimental") { | 230 action("js2c_experimental") { |
231 visibility = ":*" # Only targets in this file can depend on this. | 231 visibility = [ ":*" ] # Only targets in this file can depend on this. |
232 | 232 |
233 script = "tools/js2c.py" | 233 script = "tools/js2c.py" |
234 | 234 |
235 # The script depends on this other script, this rule causes a rebuild if it | 235 # The script depends on this other script, this rule causes a rebuild if it |
236 # changes. | 236 # changes. |
237 source_prereqs = [ "tools/jsmin.py" ] | 237 source_prereqs = [ "tools/jsmin.py" ] |
238 | 238 |
239 sources = [ | 239 sources = [ |
240 "src/macros.py", | 240 "src/macros.py", |
241 "src/proxy.js", | 241 "src/proxy.js", |
(...skipping 17 matching lines...) Expand all Loading... |
259 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] | 259 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] |
260 args += [ | 260 args += [ |
261 "--startup_blob", | 261 "--startup_blob", |
262 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir) | 262 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir) |
263 ] | 263 ] |
264 } | 264 } |
265 } | 265 } |
266 | 266 |
267 if (v8_use_external_startup_data) { | 267 if (v8_use_external_startup_data) { |
268 action("natives_blob") { | 268 action("natives_blob") { |
269 visibility = ":*" # Only targets in this file can depend on this. | 269 visibility = [ ":*" ] # Only targets in this file can depend on this. |
270 | 270 |
271 deps = [ | 271 deps = [ |
272 ":js2c", | 272 ":js2c", |
273 ":js2c_experimental" | 273 ":js2c_experimental" |
274 ] | 274 ] |
275 | 275 |
276 sources = [ | 276 sources = [ |
277 "$target_gen_dir/libraries.bin", | 277 "$target_gen_dir/libraries.bin", |
278 "$target_gen_dir/libraries_experimental.bin" | 278 "$target_gen_dir/libraries_experimental.bin" |
279 ] | 279 ] |
280 | 280 |
281 outputs = [ | 281 outputs = [ |
282 "$root_gen_dir/natives_blob.bin" | 282 "$root_gen_dir/natives_blob.bin" |
283 ] | 283 ] |
284 | 284 |
285 script = "tools/concatenate-files.py" | 285 script = "tools/concatenate-files.py" |
286 | 286 |
287 args = rebase_path(sources + outputs, root_build_dir) | 287 args = rebase_path(sources + outputs, root_build_dir) |
288 } | 288 } |
289 } | 289 } |
290 | 290 |
291 action("postmortem-metadata") { | 291 action("postmortem-metadata") { |
292 visibility = ":*" # Only targets in this file can depend on this. | 292 visibility = [ ":*" ] # Only targets in this file can depend on this. |
293 | 293 |
294 script = "tools/gen-postmortem-metadata.py" | 294 script = "tools/gen-postmortem-metadata.py" |
295 | 295 |
296 sources = [ | 296 sources = [ |
297 "src/objects.h", | 297 "src/objects.h", |
298 "src/objects-inl.h", | 298 "src/objects-inl.h", |
299 ] | 299 ] |
300 | 300 |
301 outputs = [ | 301 outputs = [ |
302 "$target_gen_dir/debug-support.cc" | 302 "$target_gen_dir/debug-support.cc" |
303 ] | 303 ] |
304 | 304 |
305 args = | 305 args = |
306 rebase_path(outputs, root_build_dir) + | 306 rebase_path(outputs, root_build_dir) + |
307 rebase_path(sources, root_build_dir) | 307 rebase_path(sources, root_build_dir) |
308 } | 308 } |
309 | 309 |
310 action("run_mksnapshot") { | 310 action("run_mksnapshot") { |
311 visibility = ":*" # Only targets in this file can depend on this. | 311 visibility = [ ":*" ] # Only targets in this file can depend on this. |
312 | 312 |
313 deps = [ ":mksnapshot($host_toolchain)" ] | 313 deps = [ ":mksnapshot($host_toolchain)" ] |
314 | 314 |
315 script = "tools/run.py" | 315 script = "tools/run.py" |
316 | 316 |
317 outputs = [ | 317 outputs = [ |
318 "$target_gen_dir/snapshot.cc" | 318 "$target_gen_dir/snapshot.cc" |
319 ] | 319 ] |
320 | 320 |
321 args = [ | 321 args = [ |
(...skipping 17 matching lines...) Expand all Loading... |
339 ] | 339 ] |
340 } | 340 } |
341 } | 341 } |
342 | 342 |
343 | 343 |
344 ############################################################################### | 344 ############################################################################### |
345 # Source Sets (aka static libraries) | 345 # Source Sets (aka static libraries) |
346 # | 346 # |
347 | 347 |
348 source_set("v8_nosnapshot") { | 348 source_set("v8_nosnapshot") { |
349 visibility = ":*" # Only targets in this file can depend on this. | 349 visibility = [ ":*" ] # Only targets in this file can depend on this. |
350 | 350 |
351 deps = [ | 351 deps = [ |
352 ":js2c", | 352 ":js2c", |
353 ":js2c_experimental", | 353 ":js2c_experimental", |
354 ":v8_base", | 354 ":v8_base", |
355 ] | 355 ] |
356 | 356 |
357 sources = [ | 357 sources = [ |
358 "$target_gen_dir/libraries.cc", | 358 "$target_gen_dir/libraries.cc", |
359 "$target_gen_dir/experimental-libraries.cc", | 359 "$target_gen_dir/experimental-libraries.cc", |
360 "src/snapshot-empty.cc", | 360 "src/snapshot-empty.cc", |
361 "src/snapshot-common.cc", | 361 "src/snapshot-common.cc", |
362 ] | 362 ] |
363 | 363 |
364 configs -= [ "//build/config/compiler:chromium_code" ] | 364 configs -= [ "//build/config/compiler:chromium_code" ] |
365 configs += [ "//build/config/compiler:no_chromium_code" ] | 365 configs += [ "//build/config/compiler:no_chromium_code" ] |
366 configs += [ ":internal_config", ":features", ":toolchain" ] | 366 configs += [ ":internal_config", ":features", ":toolchain" ] |
367 } | 367 } |
368 | 368 |
369 source_set("v8_snapshot") { | 369 source_set("v8_snapshot") { |
370 visibility = ":*" # Only targets in this file can depend on this. | 370 visibility = [ ":*" ] # Only targets in this file can depend on this. |
371 | 371 |
372 deps = [ | 372 deps = [ |
373 ":js2c", | 373 ":js2c", |
374 ":js2c_experimental", | 374 ":js2c_experimental", |
375 ":run_mksnapshot", | 375 ":run_mksnapshot", |
376 ":v8_base", | 376 ":v8_base", |
377 ] | 377 ] |
378 | 378 |
379 sources = [ | 379 sources = [ |
380 "$target_gen_dir/libraries.cc", | 380 "$target_gen_dir/libraries.cc", |
381 "$target_gen_dir/experimental-libraries.cc", | 381 "$target_gen_dir/experimental-libraries.cc", |
382 "$target_gen_dir/snapshot.cc", | 382 "$target_gen_dir/snapshot.cc", |
383 "src/snapshot-common.cc", | 383 "src/snapshot-common.cc", |
384 ] | 384 ] |
385 | 385 |
386 configs -= [ "//build/config/compiler:chromium_code" ] | 386 configs -= [ "//build/config/compiler:chromium_code" ] |
387 configs += [ "//build/config/compiler:no_chromium_code" ] | 387 configs += [ "//build/config/compiler:no_chromium_code" ] |
388 configs += [ ":internal_config", ":features", ":toolchain" ] | 388 configs += [ ":internal_config", ":features", ":toolchain" ] |
389 } | 389 } |
390 | 390 |
391 if (v8_use_external_startup_data) { | 391 if (v8_use_external_startup_data) { |
392 source_set("v8_external_snapshot") { | 392 source_set("v8_external_snapshot") { |
393 visibility = ":*" # Only targets in this file can depend on this. | 393 visibility = [ ":*" ] # Only targets in this file can depend on this. |
394 | 394 |
395 deps = [ | 395 deps = [ |
396 ":js2c", | 396 ":js2c", |
397 ":js2c_experimental", | 397 ":js2c_experimental", |
398 ":run_mksnapshot", | 398 ":run_mksnapshot", |
399 ":v8_base", | 399 ":v8_base", |
400 ":natives_blob", | 400 ":natives_blob", |
401 ] | 401 ] |
402 | 402 |
403 sources = [ | 403 sources = [ |
404 "src/natives-external.cc", | 404 "src/natives-external.cc", |
405 "src/snapshot-external.cc", | 405 "src/snapshot-external.cc", |
406 ] | 406 ] |
407 | 407 |
408 configs -= [ "//build/config/compiler:chromium_code" ] | 408 configs -= [ "//build/config/compiler:chromium_code" ] |
409 configs += [ "//build/config/compiler:no_chromium_code" ] | 409 configs += [ "//build/config/compiler:no_chromium_code" ] |
410 configs += [ ":internal_config", ":features", ":toolchain" ] | 410 configs += [ ":internal_config", ":features", ":toolchain" ] |
411 } | 411 } |
412 } | 412 } |
413 | 413 |
414 source_set("v8_base") { | 414 source_set("v8_base") { |
415 visibility = ":*" # Only targets in this file can depend on this. | 415 visibility = [ ":*" ] # Only targets in this file can depend on this. |
416 | 416 |
417 sources = [ | 417 sources = [ |
418 "src/accessors.cc", | 418 "src/accessors.cc", |
419 "src/accessors.h", | 419 "src/accessors.h", |
420 "src/allocation.cc", | 420 "src/allocation.cc", |
421 "src/allocation.h", | 421 "src/allocation.h", |
422 "src/allocation-site-scopes.cc", | 422 "src/allocation-site-scopes.cc", |
423 "src/allocation-site-scopes.h", | 423 "src/allocation-site-scopes.h", |
424 "src/allocation-tracker.cc", | 424 "src/allocation-tracker.cc", |
425 "src/allocation-tracker.h", | 425 "src/allocation-tracker.h", |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 ] | 1146 ] |
1147 } | 1147 } |
1148 | 1148 |
1149 if (v8_postmortem_support) { | 1149 if (v8_postmortem_support) { |
1150 sources += [ "$target_gen_dir/debug-support.cc" ] | 1150 sources += [ "$target_gen_dir/debug-support.cc" ] |
1151 deps += [ ":postmortem-metadata" ] | 1151 deps += [ ":postmortem-metadata" ] |
1152 } | 1152 } |
1153 } | 1153 } |
1154 | 1154 |
1155 source_set("v8_libbase") { | 1155 source_set("v8_libbase") { |
1156 visibility = ":*" # Only targets in this file can depend on this. | 1156 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1157 | 1157 |
1158 sources = [ | 1158 sources = [ |
1159 "src/base/atomicops.h", | 1159 "src/base/atomicops.h", |
1160 "src/base/atomicops_internals_arm64_gcc.h", | 1160 "src/base/atomicops_internals_arm64_gcc.h", |
1161 "src/base/atomicops_internals_arm_gcc.h", | 1161 "src/base/atomicops_internals_arm_gcc.h", |
1162 "src/base/atomicops_internals_atomicword_compat.h", | 1162 "src/base/atomicops_internals_atomicword_compat.h", |
1163 "src/base/atomicops_internals_mac.h", | 1163 "src/base/atomicops_internals_mac.h", |
1164 "src/base/atomicops_internals_mips_gcc.h", | 1164 "src/base/atomicops_internals_mips_gcc.h", |
1165 "src/base/atomicops_internals_tsan.h", | 1165 "src/base/atomicops_internals_tsan.h", |
1166 "src/base/atomicops_internals_x86_gcc.cc", | 1166 "src/base/atomicops_internals_x86_gcc.cc", |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 ":v8_libbase", | 1271 ":v8_libbase", |
1272 ] | 1272 ] |
1273 } | 1273 } |
1274 | 1274 |
1275 ############################################################################### | 1275 ############################################################################### |
1276 # Executables | 1276 # Executables |
1277 # | 1277 # |
1278 | 1278 |
1279 if (current_toolchain == host_toolchain) { | 1279 if (current_toolchain == host_toolchain) { |
1280 executable("mksnapshot") { | 1280 executable("mksnapshot") { |
1281 visibility = ":*" # Only targets in this file can depend on this. | 1281 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1282 | 1282 |
1283 sources = [ | 1283 sources = [ |
1284 "src/mksnapshot.cc", | 1284 "src/mksnapshot.cc", |
1285 ] | 1285 ] |
1286 | 1286 |
1287 configs -= [ "//build/config/compiler:chromium_code" ] | 1287 configs -= [ "//build/config/compiler:chromium_code" ] |
1288 configs += [ "//build/config/compiler:no_chromium_code" ] | 1288 configs += [ "//build/config/compiler:no_chromium_code" ] |
1289 configs += [ ":internal_config", ":features", ":toolchain" ] | 1289 configs += [ ":internal_config", ":features", ":toolchain" ] |
1290 | 1290 |
1291 deps = [ | 1291 deps = [ |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1357 deps = [ | 1357 deps = [ |
1358 ":v8_base", | 1358 ":v8_base", |
1359 ":v8_nosnapshot", | 1359 ":v8_nosnapshot", |
1360 ] | 1360 ] |
1361 } | 1361 } |
1362 | 1362 |
1363 direct_dependent_configs = [ ":external_config" ] | 1363 direct_dependent_configs = [ ":external_config" ] |
1364 } | 1364 } |
1365 | 1365 |
1366 } | 1366 } |
OLD | NEW |