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 # 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 |
20 # TODO(eseidel): The snapshot generated by the GN Android build crashes. | 21 # TODO(eseidel): The snapshot generated by the GN Android build crashes. |
21 v8_use_snapshot = !is_android | 22 v8_use_snapshot = !is_android |
22 v8_enable_extra_checks = is_debug | 23 v8_enable_extra_checks = is_debug |
23 v8_target_arch = cpu_arch | 24 v8_target_arch = cpu_arch |
24 v8_random_seed = "314159265" | 25 v8_random_seed = "314159265" |
25 | 26 |
26 | |
27 ############################################################################### | 27 ############################################################################### |
28 # Configurations | 28 # Configurations |
29 # | 29 # |
30 config("internal_config") { | 30 config("internal_config") { |
31 visibility = [ ":*" ] # Only targets in this file can depend on this. | 31 visibility = [ ":*" ] # Only targets in this file can depend on this. |
32 | 32 |
33 include_dirs = [ "." ] | 33 include_dirs = [ "." ] |
34 | 34 |
35 if (component_mode == "shared_library") { | 35 if (component_mode == "shared_library") { |
36 defines = [ | 36 defines = [ |
(...skipping 20 matching lines...) Expand all Loading... |
57 } | 57 } |
58 include_dirs = [ "include" ] | 58 include_dirs = [ "include" ] |
59 } | 59 } |
60 | 60 |
61 config("features") { | 61 config("features") { |
62 visibility = [ ":*" ] # Only targets in this file can depend on this. | 62 visibility = [ ":*" ] # Only targets in this file can depend on this. |
63 | 63 |
64 defines = [] | 64 defines = [] |
65 | 65 |
66 if (v8_enable_disassembler == true) { | 66 if (v8_enable_disassembler == true) { |
67 defines += [ | 67 defines += [ "ENABLE_DISASSEMBLER" ] |
68 "ENABLE_DISASSEMBLER", | |
69 ] | |
70 } | 68 } |
71 if (v8_enable_gdbjit == true) { | 69 if (v8_enable_gdbjit == true) { |
72 defines += [ | 70 defines += [ "ENABLE_GDB_JIT_INTERFACE" ] |
73 "ENABLE_GDB_JIT_INTERFACE", | |
74 ] | |
75 } | 71 } |
76 if (v8_object_print == true) { | 72 if (v8_object_print == true) { |
77 defines += [ | 73 defines += [ "OBJECT_PRINT" ] |
78 "OBJECT_PRINT", | |
79 ] | |
80 } | 74 } |
81 if (v8_enable_verify_heap == true) { | 75 if (v8_enable_verify_heap == true) { |
82 defines += [ | 76 defines += [ "VERIFY_HEAP" ] |
83 "VERIFY_HEAP", | |
84 ] | |
85 } | 77 } |
86 if (v8_interpreted_regexp == true) { | 78 if (v8_interpreted_regexp == true) { |
87 defines += [ | 79 defines += [ "V8_INTERPRETED_REGEXP" ] |
88 "V8_INTERPRETED_REGEXP", | |
89 ] | |
90 } | 80 } |
91 if (v8_deprecation_warnings == true) { | 81 if (v8_deprecation_warnings == true) { |
92 defines += [ | 82 defines += [ "V8_DEPRECATION_WARNINGS" ] |
93 "V8_DEPRECATION_WARNINGS", | |
94 ] | |
95 } | 83 } |
96 if (v8_enable_i18n_support == true) { | 84 if (v8_enable_i18n_support == true) { |
97 defines += [ | 85 defines += [ "V8_I18N_SUPPORT" ] |
98 "V8_I18N_SUPPORT", | |
99 ] | |
100 } | 86 } |
101 if (v8_enable_extra_checks == true) { | 87 if (v8_enable_extra_checks == true) { |
102 defines += [ | 88 defines += [ "ENABLE_EXTRA_CHECKS" ] |
103 "ENABLE_EXTRA_CHECKS", | |
104 ] | |
105 } | 89 } |
106 if (v8_enable_handle_zapping == true) { | 90 if (v8_enable_handle_zapping == true) { |
107 defines += [ | 91 defines += [ "ENABLE_HANDLE_ZAPPING" ] |
108 "ENABLE_HANDLE_ZAPPING", | |
109 ] | |
110 } | 92 } |
111 if (v8_use_external_startup_data == true) { | 93 if (v8_use_external_startup_data == true) { |
112 defines += [ | 94 defines += [ "V8_USE_EXTERNAL_STARTUP_DATA" ] |
113 "V8_USE_EXTERNAL_STARTUP_DATA", | |
114 ] | |
115 } | 95 } |
116 } | 96 } |
117 | 97 |
118 config("toolchain") { | 98 config("toolchain") { |
119 visibility = [ ":*" ] # Only targets in this file can depend on this. | 99 visibility = [ ":*" ] # Only targets in this file can depend on this. |
120 | 100 |
121 defines = [] | 101 defines = [] |
122 cflags = [] | 102 cflags = [] |
123 | 103 |
124 # TODO(jochen): Add support for arm, mips, mipsel. | 104 # TODO(jochen): Add support for arm, mips, mipsel. |
125 | 105 |
126 if (v8_target_arch == "arm64") { | 106 if (v8_target_arch == "arm64") { |
127 defines += [ | 107 defines += [ "V8_TARGET_ARCH_ARM64" ] |
128 "V8_TARGET_ARCH_ARM64", | |
129 ] | |
130 } | 108 } |
131 if (v8_target_arch == "x86") { | 109 if (v8_target_arch == "x86") { |
132 defines += [ | 110 defines += [ "V8_TARGET_ARCH_IA32" ] |
133 "V8_TARGET_ARCH_IA32", | |
134 ] | |
135 } | 111 } |
136 if (v8_target_arch == "x64") { | 112 if (v8_target_arch == "x64") { |
137 defines += [ | 113 defines += [ "V8_TARGET_ARCH_X64" ] |
138 "V8_TARGET_ARCH_X64", | |
139 ] | |
140 } | 114 } |
141 if (is_win) { | 115 if (is_win) { |
142 defines += [ | 116 defines += [ "WIN32" ] |
143 "WIN32", | |
144 ] | |
145 # TODO(jochen): Support v8_enable_prof. | 117 # TODO(jochen): Support v8_enable_prof. |
146 } | 118 } |
147 | 119 |
148 # TODO(jochen): Add support for compiling with simulators. | 120 # TODO(jochen): Add support for compiling with simulators. |
149 | 121 |
150 if (is_debug) { | 122 if (is_debug) { |
151 # TODO(jochen): Add support for different debug optimization levels. | 123 # TODO(jochen): Add support for different debug optimization levels. |
152 defines += [ | 124 defines += [ |
153 "ENABLE_DISASSEMBLER", | 125 "ENABLE_DISASSEMBLER", |
154 "V8_ENABLE_CHECKS", | 126 "V8_ENABLE_CHECKS", |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 "src/json.js", | 169 "src/json.js", |
198 "src/array-iterator.js", | 170 "src/array-iterator.js", |
199 "src/string-iterator.js", | 171 "src/string-iterator.js", |
200 "src/debug-debugger.js", | 172 "src/debug-debugger.js", |
201 "src/mirror-debugger.js", | 173 "src/mirror-debugger.js", |
202 "src/liveedit-debugger.js", | 174 "src/liveedit-debugger.js", |
203 "src/macros.py", | 175 "src/macros.py", |
204 ] | 176 ] |
205 | 177 |
206 outputs = [ | 178 outputs = [ |
207 "$target_gen_dir/libraries.cc" | 179 "$target_gen_dir/libraries.cc", |
208 ] | 180 ] |
209 | 181 |
210 if (v8_enable_i18n_support) { | 182 if (v8_enable_i18n_support) { |
211 sources += [ "src/i18n.js" ] | 183 sources += [ "src/i18n.js" ] |
212 } | 184 } |
213 | 185 |
214 args = [ | 186 args = [ |
215 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), | 187 rebase_path("$target_gen_dir/libraries.cc", root_build_dir), |
216 "CORE", | 188 "CORE", |
217 ] + rebase_path(sources, root_build_dir) | 189 ] + rebase_path(sources, root_build_dir) |
218 | 190 |
219 if (v8_use_external_startup_data) { | 191 if (v8_use_external_startup_data) { |
220 outputs += [ "$target_gen_dir/libraries.bin" ] | 192 outputs += [ "$target_gen_dir/libraries.bin" ] |
221 args += [ | 193 args += [ |
222 "--startup_blob", | 194 "--startup_blob", |
223 rebase_path("$target_gen_dir/libraries.bin", root_build_dir) | 195 rebase_path("$target_gen_dir/libraries.bin", root_build_dir), |
224 ] | 196 ] |
225 } | 197 } |
226 } | 198 } |
227 | 199 |
228 action("js2c_experimental") { | 200 action("js2c_experimental") { |
229 visibility = [ ":*" ] # Only targets in this file can depend on this. | 201 visibility = [ ":*" ] # Only targets in this file can depend on this. |
230 | 202 |
231 script = "tools/js2c.py" | 203 script = "tools/js2c.py" |
232 | 204 |
233 # The script depends on this other script, this rule causes a rebuild if it | 205 # The script depends on this other script, this rule causes a rebuild if it |
234 # changes. | 206 # changes. |
235 source_prereqs = [ "tools/jsmin.py" ] | 207 source_prereqs = [ "tools/jsmin.py" ] |
236 | 208 |
237 sources = [ | 209 sources = [ |
238 "src/macros.py", | 210 "src/macros.py", |
239 "src/proxy.js", | 211 "src/proxy.js", |
240 "src/generator.js", | 212 "src/generator.js", |
241 "src/harmony-string.js", | 213 "src/harmony-string.js", |
242 "src/harmony-array.js", | 214 "src/harmony-array.js", |
243 "src/harmony-array-includes.js", | 215 "src/harmony-array-includes.js", |
244 "src/harmony-typedarray.js", | 216 "src/harmony-typedarray.js", |
245 "src/harmony-classes.js", | 217 "src/harmony-classes.js", |
246 "src/harmony-tostring.js", | 218 "src/harmony-tostring.js", |
247 "src/harmony-templates.js", | 219 "src/harmony-templates.js", |
248 "src/harmony-regexp.js" | 220 "src/harmony-regexp.js", |
249 ] | 221 ] |
250 | 222 |
251 outputs = [ | 223 outputs = [ |
252 "$target_gen_dir/experimental-libraries.cc" | 224 "$target_gen_dir/experimental-libraries.cc", |
253 ] | 225 ] |
254 | 226 |
255 args = [ | 227 args = [ |
256 rebase_path("$target_gen_dir/experimental-libraries.cc", root_build_dir), | 228 rebase_path("$target_gen_dir/experimental-libraries.cc", |
257 "EXPERIMENTAL", | 229 root_build_dir), |
258 ] + rebase_path(sources, root_build_dir) | 230 "EXPERIMENTAL", |
| 231 ] + rebase_path(sources, root_build_dir) |
259 | 232 |
260 if (v8_use_external_startup_data) { | 233 if (v8_use_external_startup_data) { |
261 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] | 234 outputs += [ "$target_gen_dir/libraries_experimental.bin" ] |
262 args += [ | 235 args += [ |
263 "--startup_blob", | 236 "--startup_blob", |
264 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir) | 237 rebase_path("$target_gen_dir/libraries_experimental.bin", root_build_dir), |
265 ] | 238 ] |
266 } | 239 } |
267 } | 240 } |
268 | 241 |
269 if (v8_use_external_startup_data) { | 242 if (v8_use_external_startup_data) { |
270 action("natives_blob") { | 243 action("natives_blob") { |
271 visibility = [ ":*" ] # Only targets in this file can depend on this. | 244 visibility = [ ":*" ] # Only targets in this file can depend on this. |
272 | 245 |
273 deps = [ | 246 deps = [ |
274 ":js2c", | 247 ":js2c", |
275 ":js2c_experimental" | 248 ":js2c_experimental", |
276 ] | 249 ] |
277 | 250 |
278 sources = [ | 251 sources = [ |
279 "$target_gen_dir/libraries.bin", | 252 "$target_gen_dir/libraries.bin", |
280 "$target_gen_dir/libraries_experimental.bin" | 253 "$target_gen_dir/libraries_experimental.bin", |
281 ] | 254 ] |
282 | 255 |
283 outputs = [ | 256 outputs = [ |
284 "$root_out_dir/natives_blob.bin" | 257 "$root_out_dir/natives_blob.bin", |
285 ] | 258 ] |
286 | 259 |
287 script = "tools/concatenate-files.py" | 260 script = "tools/concatenate-files.py" |
288 | 261 |
289 args = rebase_path(sources + outputs, root_build_dir) | 262 args = rebase_path(sources + outputs, root_build_dir) |
290 } | 263 } |
291 } | 264 } |
292 | 265 |
293 action("postmortem-metadata") { | 266 action("postmortem-metadata") { |
294 visibility = [ ":*" ] # Only targets in this file can depend on this. | 267 visibility = [ ":*" ] # Only targets in this file can depend on this. |
295 | 268 |
296 script = "tools/gen-postmortem-metadata.py" | 269 script = "tools/gen-postmortem-metadata.py" |
297 | 270 |
298 sources = [ | 271 sources = [ |
299 "src/objects.h", | 272 "src/objects.h", |
300 "src/objects-inl.h", | 273 "src/objects-inl.h", |
301 ] | 274 ] |
302 | 275 |
303 outputs = [ | 276 outputs = [ |
304 "$target_gen_dir/debug-support.cc" | 277 "$target_gen_dir/debug-support.cc", |
305 ] | 278 ] |
306 | 279 |
307 args = | 280 args = rebase_path(outputs, root_build_dir) + |
308 rebase_path(outputs, root_build_dir) + | 281 rebase_path(sources, root_build_dir) |
309 rebase_path(sources, root_build_dir) | |
310 } | 282 } |
311 | 283 |
312 action("run_mksnapshot") { | 284 action("run_mksnapshot") { |
313 visibility = [ ":*" ] # Only targets in this file can depend on this. | 285 visibility = [ ":*" ] # Only targets in this file can depend on this. |
314 | 286 |
315 deps = [ ":mksnapshot($host_toolchain)" ] | 287 deps = [ |
| 288 ":mksnapshot($host_toolchain)", |
| 289 ] |
316 | 290 |
317 script = "tools/run.py" | 291 script = "tools/run.py" |
318 | 292 |
319 outputs = [ | 293 outputs = [ |
320 "$target_gen_dir/snapshot.cc" | 294 "$target_gen_dir/snapshot.cc", |
321 ] | 295 ] |
322 | 296 |
323 args = [ | 297 args = [ |
324 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", | 298 "./" + rebase_path(get_label_info(":mksnapshot($host_toolchain)", |
325 "root_out_dir") + "/mksnapshot", | 299 "root_out_dir") + "/mksnapshot", |
326 root_build_dir), | 300 root_build_dir), |
327 "--log-snapshot-positions", | 301 "--log-snapshot-positions", |
328 "--logfile", rebase_path("$target_gen_dir/snapshot.log", root_build_dir), | 302 "--logfile", |
329 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir) | 303 rebase_path("$target_gen_dir/snapshot.log", root_build_dir), |
| 304 rebase_path("$target_gen_dir/snapshot.cc", root_build_dir), |
330 ] | 305 ] |
331 | 306 |
332 if (v8_random_seed != "0") { | 307 if (v8_random_seed != "0") { |
333 args += [ "--random-seed", v8_random_seed ] | 308 args += [ |
| 309 "--random-seed", |
| 310 v8_random_seed, |
| 311 ] |
334 } | 312 } |
335 | 313 |
336 if (v8_use_external_startup_data) { | 314 if (v8_use_external_startup_data) { |
337 outputs += [ "$root_out_dir/snapshot_blob.bin" ] | 315 outputs += [ "$root_out_dir/snapshot_blob.bin" ] |
338 args += [ | 316 args += [ |
339 "--startup_blob", | 317 "--startup_blob", |
340 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir) | 318 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), |
341 ] | 319 ] |
342 } | 320 } |
343 } | 321 } |
344 | 322 |
345 | |
346 ############################################################################### | 323 ############################################################################### |
347 # Source Sets (aka static libraries) | 324 # Source Sets (aka static libraries) |
348 # | 325 # |
349 | 326 |
350 source_set("v8_nosnapshot") { | 327 source_set("v8_nosnapshot") { |
351 visibility = [ ":*" ] # Only targets in this file can depend on this. | 328 visibility = [ ":*" ] # Only targets in this file can depend on this. |
352 | 329 |
353 deps = [ | 330 deps = [ |
354 ":js2c", | 331 ":js2c", |
355 ":js2c_experimental", | 332 ":js2c_experimental", |
356 ":v8_base", | 333 ":v8_base", |
357 ] | 334 ] |
358 | 335 |
359 sources = [ | 336 sources = [ |
360 "$target_gen_dir/libraries.cc", | 337 "$target_gen_dir/libraries.cc", |
361 "$target_gen_dir/experimental-libraries.cc", | 338 "$target_gen_dir/experimental-libraries.cc", |
362 "src/snapshot-empty.cc", | 339 "src/snapshot-empty.cc", |
363 ] | 340 ] |
364 | 341 |
365 configs -= [ "//build/config/compiler:chromium_code" ] | 342 configs -= [ "//build/config/compiler:chromium_code" ] |
366 configs += [ "//build/config/compiler:no_chromium_code" ] | 343 configs += [ "//build/config/compiler:no_chromium_code" ] |
367 configs += [ ":internal_config", ":features", ":toolchain" ] | 344 configs += [ |
| 345 ":internal_config", |
| 346 ":features", |
| 347 ":toolchain", |
| 348 ] |
368 } | 349 } |
369 | 350 |
370 source_set("v8_snapshot") { | 351 source_set("v8_snapshot") { |
371 visibility = [ ":*" ] # Only targets in this file can depend on this. | 352 visibility = [ ":*" ] # Only targets in this file can depend on this. |
372 | 353 |
373 deps = [ | 354 deps = [ |
374 ":js2c", | 355 ":js2c", |
375 ":js2c_experimental", | 356 ":js2c_experimental", |
376 ":run_mksnapshot", | 357 ":run_mksnapshot", |
377 ":v8_base", | 358 ":v8_base", |
378 ] | 359 ] |
379 | 360 |
380 sources = [ | 361 sources = [ |
381 "$target_gen_dir/libraries.cc", | 362 "$target_gen_dir/libraries.cc", |
382 "$target_gen_dir/experimental-libraries.cc", | 363 "$target_gen_dir/experimental-libraries.cc", |
383 "$target_gen_dir/snapshot.cc", | 364 "$target_gen_dir/snapshot.cc", |
384 ] | 365 ] |
385 | 366 |
386 configs -= [ "//build/config/compiler:chromium_code" ] | 367 configs -= [ "//build/config/compiler:chromium_code" ] |
387 configs += [ "//build/config/compiler:no_chromium_code" ] | 368 configs += [ "//build/config/compiler:no_chromium_code" ] |
388 configs += [ ":internal_config", ":features", ":toolchain" ] | 369 configs += [ |
| 370 ":internal_config", |
| 371 ":features", |
| 372 ":toolchain", |
| 373 ] |
389 } | 374 } |
390 | 375 |
391 if (v8_use_external_startup_data) { | 376 if (v8_use_external_startup_data) { |
392 source_set("v8_external_snapshot") { | 377 source_set("v8_external_snapshot") { |
393 visibility = [ ":*" ] # Only targets in this file can depend on this. | 378 visibility = [ ":*" ] # Only targets in this file can depend on this. |
394 | 379 |
395 deps = [ | 380 deps = [ |
396 ":js2c", | 381 ":js2c", |
397 ":js2c_experimental", | 382 ":js2c_experimental", |
398 ":run_mksnapshot", | 383 ":run_mksnapshot", |
399 ":v8_base", | 384 ":v8_base", |
400 ":natives_blob", | 385 ":natives_blob", |
401 ] | 386 ] |
402 | 387 |
403 sources = [ | 388 sources = [ |
404 "src/natives-external.cc", | 389 "src/natives-external.cc", |
405 "src/snapshot-external.cc", | 390 "src/snapshot-external.cc", |
406 ] | 391 ] |
407 | 392 |
408 configs -= [ "//build/config/compiler:chromium_code" ] | 393 configs -= [ "//build/config/compiler:chromium_code" ] |
409 configs += [ "//build/config/compiler:no_chromium_code" ] | 394 configs += [ "//build/config/compiler:no_chromium_code" ] |
410 configs += [ ":internal_config", ":features", ":toolchain" ] | 395 configs += [ |
| 396 ":internal_config", |
| 397 ":features", |
| 398 ":toolchain", |
| 399 ] |
411 } | 400 } |
412 } | 401 } |
413 | 402 |
414 source_set("v8_base") { | 403 source_set("v8_base") { |
415 visibility = [ ":*" ] # Only targets in this file can depend on this. | 404 visibility = [ ":*" ] # Only targets in this file can depend on this. |
416 | 405 |
417 sources = [ | 406 sources = [ |
418 "src/accessors.cc", | 407 "src/accessors.cc", |
419 "src/accessors.h", | 408 "src/accessors.h", |
420 "src/allocation.cc", | 409 "src/allocation.cc", |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 "src/ic/mips64/access-compiler-mips64.cc", | 1194 "src/ic/mips64/access-compiler-mips64.cc", |
1206 "src/ic/mips64/handler-compiler-mips64.cc", | 1195 "src/ic/mips64/handler-compiler-mips64.cc", |
1207 "src/ic/mips64/ic-mips64.cc", | 1196 "src/ic/mips64/ic-mips64.cc", |
1208 "src/ic/mips64/ic-compiler-mips64.cc", | 1197 "src/ic/mips64/ic-compiler-mips64.cc", |
1209 "src/ic/mips64/stub-cache-mips64.cc", | 1198 "src/ic/mips64/stub-cache-mips64.cc", |
1210 ] | 1199 ] |
1211 } | 1200 } |
1212 | 1201 |
1213 configs -= [ "//build/config/compiler:chromium_code" ] | 1202 configs -= [ "//build/config/compiler:chromium_code" ] |
1214 configs += [ "//build/config/compiler:no_chromium_code" ] | 1203 configs += [ "//build/config/compiler:no_chromium_code" ] |
1215 configs += [ ":internal_config", ":features", ":toolchain" ] | 1204 configs += [ |
| 1205 ":internal_config", |
| 1206 ":features", |
| 1207 ":toolchain", |
| 1208 ] |
1216 | 1209 |
1217 if (!is_debug) { | 1210 if (!is_debug) { |
1218 configs -= [ "//build/config/compiler:optimize" ] | 1211 configs -= [ "//build/config/compiler:optimize" ] |
1219 configs += [ "//build/config/compiler:optimize_max" ] | 1212 configs += [ "//build/config/compiler:optimize_max" ] |
1220 } | 1213 } |
1221 | 1214 |
1222 defines = [] | 1215 defines = [] |
1223 deps = [ ":v8_libbase" ] | 1216 deps = [ |
| 1217 ":v8_libbase", |
| 1218 ] |
1224 | 1219 |
1225 if (is_win) { | 1220 if (is_win) { |
1226 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 1221 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
1227 cflags = [ "/wd4267" ] | 1222 cflags = [ "/wd4267" ] |
1228 } | 1223 } |
1229 | 1224 |
1230 if (v8_enable_i18n_support) { | 1225 if (v8_enable_i18n_support) { |
1231 deps += [ "//third_party/icu" ] | 1226 deps += [ "//third_party/icu" ] |
1232 if (is_win) { | 1227 if (is_win) { |
1233 deps += [ "//third_party/icu:icudata" ] | 1228 deps += [ "//third_party/icu:icudata" ] |
1234 } | 1229 } |
| 1230 |
1235 # TODO(jochen): Add support for icu_use_data_file_flag | 1231 # TODO(jochen): Add support for icu_use_data_file_flag |
1236 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] | 1232 defines += [ "ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE" ] |
1237 } else { | 1233 } else { |
1238 sources -= [ | 1234 sources -= [ |
1239 "src/i18n.cc", | 1235 "src/i18n.cc", |
1240 "src/i18n.h", | 1236 "src/i18n.h", |
1241 ] | 1237 ] |
1242 } | 1238 } |
1243 | 1239 |
1244 if (v8_postmortem_support) { | 1240 if (v8_postmortem_support) { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1293 "src/base/safe_math.h", | 1289 "src/base/safe_math.h", |
1294 "src/base/safe_math_impl.h", | 1290 "src/base/safe_math_impl.h", |
1295 "src/base/sys-info.cc", | 1291 "src/base/sys-info.cc", |
1296 "src/base/sys-info.h", | 1292 "src/base/sys-info.h", |
1297 "src/base/utils/random-number-generator.cc", | 1293 "src/base/utils/random-number-generator.cc", |
1298 "src/base/utils/random-number-generator.h", | 1294 "src/base/utils/random-number-generator.h", |
1299 ] | 1295 ] |
1300 | 1296 |
1301 configs -= [ "//build/config/compiler:chromium_code" ] | 1297 configs -= [ "//build/config/compiler:chromium_code" ] |
1302 configs += [ "//build/config/compiler:no_chromium_code" ] | 1298 configs += [ "//build/config/compiler:no_chromium_code" ] |
1303 configs += [ ":internal_config_base", ":features", ":toolchain" ] | 1299 configs += [ |
| 1300 ":internal_config_base", |
| 1301 ":features", |
| 1302 ":toolchain", |
| 1303 ] |
1304 | 1304 |
1305 if (!is_debug) { | 1305 if (!is_debug) { |
1306 configs -= [ "//build/config/compiler:optimize" ] | 1306 configs -= [ "//build/config/compiler:optimize" ] |
1307 configs += [ "//build/config/compiler:optimize_max" ] | 1307 configs += [ "//build/config/compiler:optimize_max" ] |
1308 } | 1308 } |
1309 | 1309 |
1310 defines = [] | 1310 defines = [] |
1311 | 1311 |
1312 if (is_posix) { | 1312 if (is_posix) { |
1313 sources += [ | 1313 sources += [ "src/base/platform/platform-posix.cc" ] |
1314 "src/base/platform/platform-posix.cc" | |
1315 ] | |
1316 } | 1314 } |
1317 | 1315 |
1318 if (is_linux) { | 1316 if (is_linux) { |
1319 sources += [ | 1317 sources += [ "src/base/platform/platform-linux.cc" ] |
1320 "src/base/platform/platform-linux.cc" | |
1321 ] | |
1322 | 1318 |
1323 libs = [ "rt" ] | 1319 libs = [ "rt" ] |
1324 } else if (is_android) { | 1320 } else if (is_android) { |
1325 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ] | 1321 defines += [ "CAN_USE_VFP_INSTRUCTIONS" ] |
1326 | 1322 |
1327 if (build_os == "mac") { | 1323 if (build_os == "mac") { |
1328 if (current_toolchain == host_toolchain) { | 1324 if (current_toolchain == host_toolchain) { |
1329 sources += [ "src/base/platform/platform-macos.cc" ] | 1325 sources += [ "src/base/platform/platform-macos.cc" ] |
1330 } else { | 1326 } else { |
1331 sources += [ "src/base/platform/platform-linux.cc" ] | 1327 sources += [ "src/base/platform/platform-linux.cc" ] |
1332 } | 1328 } |
1333 } else { | 1329 } else { |
1334 sources += [ "src/base/platform/platform-linux.cc" ] | 1330 sources += [ "src/base/platform/platform-linux.cc" ] |
1335 if (current_toolchain == host_toolchain) { | 1331 if (current_toolchain == host_toolchain) { |
1336 defines += [ "V8_LIBRT_NOT_AVAILABLE" ] | 1332 defines += [ "V8_LIBRT_NOT_AVAILABLE" ] |
1337 } | 1333 } |
1338 } | 1334 } |
1339 } else if (is_mac) { | 1335 } else if (is_mac) { |
1340 sources += [ "src/base/platform/platform-macos.cc" ] | 1336 sources += [ "src/base/platform/platform-macos.cc" ] |
1341 } else if (is_win) { | 1337 } else if (is_win) { |
1342 # TODO(jochen): Add support for cygwin. | 1338 # TODO(jochen): Add support for cygwin. |
1343 sources += [ | 1339 sources += [ |
1344 "src/base/platform/platform-win32.cc", | 1340 "src/base/platform/platform-win32.cc", |
1345 "src/base/win32-headers.h", | 1341 "src/base/win32-headers.h", |
1346 ] | 1342 ] |
1347 | 1343 |
1348 defines += [ "_CRT_RAND_S" ] # for rand_s() | 1344 defines += [ "_CRT_RAND_S" ] # for rand_s() |
1349 | 1345 |
1350 libs = [ "winmm.lib", "ws2_32.lib" ] | 1346 libs = [ |
| 1347 "winmm.lib", |
| 1348 "ws2_32.lib", |
| 1349 ] |
1351 } | 1350 } |
1352 | 1351 |
1353 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. | 1352 # TODO(jochen): Add support for qnx, freebsd, openbsd, netbsd, and solaris. |
1354 } | 1353 } |
1355 | 1354 |
1356 source_set("v8_libplatform") { | 1355 source_set("v8_libplatform") { |
1357 sources = [ | 1356 sources = [ |
1358 "include/libplatform/libplatform.h", | 1357 "include/libplatform/libplatform.h", |
1359 "src/libplatform/default-platform.cc", | 1358 "src/libplatform/default-platform.cc", |
1360 "src/libplatform/default-platform.h", | 1359 "src/libplatform/default-platform.h", |
1361 "src/libplatform/task-queue.cc", | 1360 "src/libplatform/task-queue.cc", |
1362 "src/libplatform/task-queue.h", | 1361 "src/libplatform/task-queue.h", |
1363 "src/libplatform/worker-thread.cc", | 1362 "src/libplatform/worker-thread.cc", |
1364 "src/libplatform/worker-thread.h", | 1363 "src/libplatform/worker-thread.h", |
1365 ] | 1364 ] |
1366 | 1365 |
1367 configs -= [ "//build/config/compiler:chromium_code" ] | 1366 configs -= [ "//build/config/compiler:chromium_code" ] |
1368 configs += [ "//build/config/compiler:no_chromium_code" ] | 1367 configs += [ "//build/config/compiler:no_chromium_code" ] |
1369 configs += [ ":internal_config_base", ":features", ":toolchain" ] | 1368 configs += [ |
| 1369 ":internal_config_base", |
| 1370 ":features", |
| 1371 ":toolchain", |
| 1372 ] |
1370 | 1373 |
1371 if (!is_debug) { | 1374 if (!is_debug) { |
1372 configs -= [ "//build/config/compiler:optimize" ] | 1375 configs -= [ "//build/config/compiler:optimize" ] |
1373 configs += [ "//build/config/compiler:optimize_max" ] | 1376 configs += [ "//build/config/compiler:optimize_max" ] |
1374 } | 1377 } |
1375 | 1378 |
1376 deps = [ | 1379 deps = [ |
1377 ":v8_libbase", | 1380 ":v8_libbase", |
1378 ] | 1381 ] |
1379 } | 1382 } |
1380 | 1383 |
1381 ############################################################################### | 1384 ############################################################################### |
1382 # Executables | 1385 # Executables |
1383 # | 1386 # |
1384 | 1387 |
1385 if (current_toolchain == host_toolchain) { | 1388 if (current_toolchain == host_toolchain) { |
1386 executable("mksnapshot") { | 1389 executable("mksnapshot") { |
1387 visibility = [ ":*" ] # Only targets in this file can depend on this. | 1390 visibility = [ ":*" ] # Only targets in this file can depend on this. |
1388 | 1391 |
1389 sources = [ | 1392 sources = [ |
1390 "src/mksnapshot.cc", | 1393 "src/mksnapshot.cc", |
1391 ] | 1394 ] |
1392 | 1395 |
1393 configs -= [ "//build/config/compiler:chromium_code" ] | 1396 configs -= [ "//build/config/compiler:chromium_code" ] |
1394 configs += [ "//build/config/compiler:no_chromium_code" ] | 1397 configs += [ "//build/config/compiler:no_chromium_code" ] |
1395 configs += [ ":internal_config", ":features", ":toolchain" ] | 1398 configs += [ |
| 1399 ":internal_config", |
| 1400 ":features", |
| 1401 ":toolchain", |
| 1402 ] |
1396 | 1403 |
1397 deps = [ | 1404 deps = [ |
1398 ":v8_base", | 1405 ":v8_base", |
1399 ":v8_libplatform", | 1406 ":v8_libplatform", |
1400 ":v8_nosnapshot", | 1407 ":v8_nosnapshot", |
1401 "//build/config/sanitizers:deps", | 1408 "//build/config/sanitizers:deps", |
1402 ] | 1409 ] |
1403 } | 1410 } |
1404 } | 1411 } |
1405 | 1412 |
1406 ############################################################################### | 1413 ############################################################################### |
1407 # Public targets | 1414 # Public targets |
1408 # | 1415 # |
1409 | 1416 |
1410 if (component_mode == "shared_library") { | 1417 if (component_mode == "shared_library") { |
| 1418 component("v8") { |
| 1419 sources = [ |
| 1420 "src/v8dll-main.cc", |
| 1421 ] |
1411 | 1422 |
1412 component("v8") { | 1423 if (v8_use_snapshot && v8_use_external_startup_data) { |
1413 sources = [ | 1424 deps = [ |
1414 "src/v8dll-main.cc", | 1425 ":v8_base", |
1415 ] | 1426 ":v8_external_snapshot", |
| 1427 ] |
| 1428 } else if (v8_use_snapshot) { |
| 1429 deps = [ |
| 1430 ":v8_base", |
| 1431 ":v8_snapshot", |
| 1432 ] |
| 1433 } else { |
| 1434 assert(!v8_use_external_startup_data) |
| 1435 deps = [ |
| 1436 ":v8_base", |
| 1437 ":v8_nosnapshot", |
| 1438 ] |
| 1439 } |
1416 | 1440 |
1417 if (v8_use_snapshot && v8_use_external_startup_data) { | 1441 configs -= [ "//build/config/compiler:chromium_code" ] |
1418 deps = [ | 1442 configs += [ "//build/config/compiler:no_chromium_code" ] |
1419 ":v8_base", | 1443 configs += [ |
1420 ":v8_external_snapshot", | 1444 ":internal_config", |
| 1445 ":features", |
| 1446 ":toolchain", |
1421 ] | 1447 ] |
1422 } else if (v8_use_snapshot) { | 1448 |
1423 deps = [ | 1449 direct_dependent_configs = [ ":external_config" ] |
1424 ":v8_base", | 1450 |
1425 ":v8_snapshot", | 1451 libs = [] |
1426 ] | 1452 if (is_android && current_toolchain != host_toolchain) { |
1427 } else { | 1453 libs += [ "log" ] |
1428 assert(!v8_use_external_startup_data) | 1454 } |
1429 deps = [ | |
1430 ":v8_base", | |
1431 ":v8_nosnapshot", | |
1432 ] | |
1433 } | 1455 } |
| 1456 } else { |
| 1457 group("v8") { |
| 1458 if (v8_use_snapshot && v8_use_external_startup_data) { |
| 1459 deps = [ |
| 1460 ":v8_base", |
| 1461 ":v8_external_snapshot", |
| 1462 ] |
| 1463 } else if (v8_use_snapshot) { |
| 1464 deps = [ |
| 1465 ":v8_base", |
| 1466 ":v8_snapshot", |
| 1467 ] |
| 1468 } else { |
| 1469 assert(!v8_use_external_startup_data) |
| 1470 deps = [ |
| 1471 ":v8_base", |
| 1472 ":v8_nosnapshot", |
| 1473 ] |
| 1474 } |
1434 | 1475 |
1435 configs -= [ "//build/config/compiler:chromium_code" ] | 1476 direct_dependent_configs = [ ":external_config" ] |
1436 configs += [ "//build/config/compiler:no_chromium_code" ] | |
1437 configs += [ ":internal_config", ":features", ":toolchain" ] | |
1438 | |
1439 direct_dependent_configs = [ ":external_config" ] | |
1440 | |
1441 libs = [] | |
1442 if (is_android && current_toolchain != host_toolchain) { | |
1443 libs += [ "log" ] | |
1444 } | 1477 } |
1445 } | 1478 } |
1446 | |
1447 } else { | |
1448 | |
1449 group("v8") { | |
1450 if (v8_use_snapshot && v8_use_external_startup_data) { | |
1451 deps = [ | |
1452 ":v8_base", | |
1453 ":v8_external_snapshot", | |
1454 ] | |
1455 } else if (v8_use_snapshot) { | |
1456 deps = [ | |
1457 ":v8_base", | |
1458 ":v8_snapshot", | |
1459 ] | |
1460 } else { | |
1461 assert(!v8_use_external_startup_data) | |
1462 deps = [ | |
1463 ":v8_base", | |
1464 ":v8_nosnapshot", | |
1465 ] | |
1466 } | |
1467 | |
1468 direct_dependent_configs = [ ":external_config" ] | |
1469 } | |
1470 | |
1471 } | |
OLD | NEW |