OLD | NEW |
---|---|
(Empty) | |
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
2 # for details. All rights reserved. Use of this source code is governed by a | |
3 # BSD-style license that can be found in the LICENSE file. | |
4 | |
5 { | |
6 'variables': { | |
7 'gen_source_dir': '<(SHARED_INTERMEDIATE_DIR)', | |
8 | |
9 'io_cc_file': '<(gen_source_dir)/io_gen.cc', | |
10 'io_patch_cc_file': '<(gen_source_dir)/io_patch_gen.cc', | |
11 'html_cc_file': '<(gen_source_dir)/html_gen.cc', | |
12 'html_common_cc_file': '<(gen_source_dir)/html_common_gen.cc', | |
13 'js_cc_file': '<(gen_source_dir)/js_gen.cc', | |
14 'js_util_cc_file': '<(gen_source_dir)/js_util_gen.cc', | |
15 'blink_cc_file': '<(gen_source_dir)/blink_gen.cc', | |
16 'indexeddb_cc_file': '<(gen_source_dir)/indexeddb_gen.cc', | |
17 'cached_patches_cc_file': '<(gen_source_dir)/cached_patches_gen.cc', | |
18 'web_gl_cc_file': '<(gen_source_dir)/web_gl_gen.cc', | |
19 'metadata_cc_file': '<(gen_source_dir)/metadata_gen.cc', | |
20 'websql_cc_file': '<(gen_source_dir)/websql_gen.cc', | |
21 'svg_cc_file': '<(gen_source_dir)/svg_gen.cc', | |
22 'webaudio_cc_file': '<(gen_source_dir)/webaudio_gen.cc', | |
23 | |
24 'builtin_in_cc_file': 'builtin_in.cc', | |
25 'builtin_cc_file': '<(gen_source_dir)/builtin_gen.cc', | |
26 'snapshot_in_cc_file': 'snapshot_in.cc', | |
27 'vm_isolate_snapshot_bin_file': '<(gen_source_dir)/vm_isolate_snapshot_gen.b in', | |
28 'isolate_snapshot_bin_file': '<(gen_source_dir)/isolate_snapshot_gen.bin', | |
29 'gen_snapshot_stamp_file': '<(gen_source_dir)/gen_snapshot.stamp', | |
30 'resources_cc_file': '<(gen_source_dir)/resources_gen.cc', | |
31 'snapshot_cc_file': '<(gen_source_dir)/snapshot_gen.cc', | |
32 'observatory_assets_cc_file': '<(gen_source_dir)/observatory_assets.cc', | |
33 'observatory_assets_tar_file': '<(gen_source_dir)/observatory_assets.tar', | |
34 }, | |
35 'targets': [ | |
36 { | |
37 'target_name': 'generate_builtin_cc_file', | |
38 'type': 'none', | |
39 'toolsets':['host'], | |
40 'includes': [ | |
41 'builtin_sources.gypi', | |
42 ], | |
43 'actions': [ | |
44 { | |
45 'action_name': 'generate_builtin_cc', | |
46 'inputs': [ | |
47 '../tools/gen_library_src_paths.py', | |
48 '<(builtin_in_cc_file)', | |
49 '<@(_sources)', | |
50 ], | |
51 'outputs': [ | |
52 '<(builtin_cc_file)', | |
53 ], | |
54 'action': [ | |
55 'python', | |
56 'tools/gen_library_src_paths.py', | |
57 '--output', '<(builtin_cc_file)', | |
58 '--input_cc', '<(builtin_in_cc_file)', | |
59 '--include', 'bin/builtin.h', | |
60 '--var_name', 'dart::bin::Builtin::_builtin_source_paths_', | |
61 '--library_name', 'dart:_builtin', | |
62 '<@(_sources)', | |
63 ], | |
64 'message': 'Generating ''<(builtin_cc_file)'' file.' | |
65 }, | |
66 ] | |
67 }, | |
68 { | |
69 'target_name': 'generate_io_cc_file', | |
keertip
2017/08/04 16:53:22
Zach, we have translated these into genrules in th
zra
2017/08/04 17:01:53
Sorry, misunderstood your question at first. There
| |
70 'type': 'none', | |
71 'toolsets':['host'], | |
72 'sources': [ | |
73 '../../sdk/lib/io/io.dart', | |
74 ], | |
75 'includes': [ | |
76 '../../sdk/lib/io/io_sources.gypi', | |
77 ], | |
78 'actions': [ | |
79 { | |
80 'action_name': 'generate_io_cc', | |
81 'inputs': [ | |
82 '../tools/gen_library_src_paths.py', | |
83 '<(builtin_in_cc_file)', | |
84 '<@(_sources)', | |
85 ], | |
86 'outputs': [ | |
87 '<(io_cc_file)', | |
88 ], | |
89 'action': [ | |
90 'python', | |
91 'tools/gen_library_src_paths.py', | |
92 '--output', '<(io_cc_file)', | |
93 '--input_cc', '<(builtin_in_cc_file)', | |
94 '--include', 'bin/builtin.h', | |
95 '--var_name', 'dart::bin::Builtin::io_source_paths_', | |
96 '--library_name', 'dart:io', | |
97 '<@(_sources)', | |
98 ], | |
99 'message': 'Generating ''<(io_cc_file)'' file.' | |
100 }, | |
101 ] | |
102 }, | |
103 { | |
104 'target_name': 'generate_io_patch_cc_file', | |
105 'type': 'none', | |
106 'toolsets':['host'], | |
107 'includes': [ | |
108 'io_sources.gypi', | |
109 ], | |
110 'actions': [ | |
111 { | |
112 'action_name': 'generate_io_patch_cc', | |
113 'inputs': [ | |
114 '../tools/gen_library_src_paths.py', | |
115 '<(builtin_in_cc_file)', | |
116 '<@(_sources)', | |
117 ], | |
118 'outputs': [ | |
119 '<(io_patch_cc_file)', | |
120 ], | |
121 'action': [ | |
122 'python', | |
123 'tools/gen_library_src_paths.py', | |
124 '--output', '<(io_patch_cc_file)', | |
125 '--input_cc', '<(builtin_in_cc_file)', | |
126 '--include', 'bin/builtin.h', | |
127 '--var_name', 'dart::bin::Builtin::io_patch_paths_', | |
128 '--library_name', 'dart:io', | |
129 '<@(_sources)', | |
130 ], | |
131 'message': 'Generating ''<(io_patch_cc_file)'' file.' | |
132 }, | |
133 ] | |
134 }, | |
135 { | |
136 'target_name': 'generate_html_cc_file', | |
137 'type': 'none', | |
138 'toolsets':['host'], | |
139 'sources': [ | |
140 '../../sdk/lib/html/dartium/html_dartium.dart', | |
141 ], | |
142 'actions': [ | |
143 { | |
144 'action_name': 'generate_html_cc', | |
145 'inputs': [ | |
146 '../tools/gen_library_src_paths.py', | |
147 '<(builtin_in_cc_file)', | |
148 '<@(_sources)', | |
149 ], | |
150 'outputs': [ | |
151 '<(html_cc_file)', | |
152 ], | |
153 'action': [ | |
154 'python', | |
155 'tools/gen_library_src_paths.py', | |
156 '--output', '<(html_cc_file)', | |
157 '--input_cc', '<(builtin_in_cc_file)', | |
158 '--include', 'bin/builtin.h', | |
159 '--var_name', 'dart::bin::Builtin::html_source_paths_', | |
160 '--library_name', 'dart:html', | |
161 '<@(_sources)', | |
162 ], | |
163 'message': 'Generating ''<(html_cc_file)'' file.' | |
164 }, | |
165 ] | |
166 }, | |
167 { | |
168 'target_name': 'generate_html_common_cc_file', | |
169 'type': 'none', | |
170 'toolsets':['host'], | |
171 'sources': [ | |
172 '../../sdk/lib/html/html_common/html_common.dart', | |
173 '../../sdk/lib/html/html_common/css_class_set.dart', | |
174 '../../sdk/lib/html/html_common/device.dart', | |
175 '../../sdk/lib/html/html_common/filtered_element_list.dart', | |
176 '../../sdk/lib/html/html_common/lists.dart', | |
177 '../../sdk/lib/html/html_common/conversions.dart', | |
178 '../../sdk/lib/html/html_common/conversions_dartium.dart', | |
179 ], | |
180 'actions': [ | |
181 { | |
182 'action_name': 'generate_html_common_cc', | |
183 'inputs': [ | |
184 '../tools/gen_library_src_paths.py', | |
185 '<(builtin_in_cc_file)', | |
186 '<@(_sources)', | |
187 ], | |
188 'outputs': [ | |
189 '<(html_common_cc_file)', | |
190 ], | |
191 'action': [ | |
192 'python', | |
193 'tools/gen_library_src_paths.py', | |
194 '--output', '<(html_common_cc_file)', | |
195 '--input_cc', '<(builtin_in_cc_file)', | |
196 '--include', 'bin/builtin.h', | |
197 '--var_name', 'dart::bin::Builtin::html_common_source_paths_', | |
198 '--library_name', 'dart:html_common', | |
199 '<@(_sources)', | |
200 ], | |
201 'message': 'Generating ''<(html_common_cc_file)'' file.' | |
202 }, | |
203 ] | |
204 }, | |
205 { | |
206 'target_name': 'generate_js_cc_file', | |
207 'type': 'none', | |
208 'toolsets':['host'], | |
209 'sources': [ | |
210 '../../sdk/lib/js/dartium/js_dartium.dart', | |
211 ], | |
212 'actions': [ | |
213 { | |
214 'action_name': 'generate_js_cc', | |
215 'inputs': [ | |
216 '../tools/gen_library_src_paths.py', | |
217 '<(builtin_in_cc_file)', | |
218 '<@(_sources)', | |
219 ], | |
220 'outputs': [ | |
221 '<(js_cc_file)', | |
222 ], | |
223 'action': [ | |
224 'python', | |
225 'tools/gen_library_src_paths.py', | |
226 '--output', '<(js_cc_file)', | |
227 '--input_cc', '<(builtin_in_cc_file)', | |
228 '--include', 'bin/builtin.h', | |
229 '--var_name', 'dart::bin::Builtin::js_source_paths_', | |
230 '--library_name', 'dart:js', | |
231 '<@(_sources)', | |
232 ], | |
233 'message': 'Generating ''<(js_cc_file)'' file.' | |
234 }, | |
235 ] | |
236 }, | |
237 { | |
238 'target_name': 'generate_js_util_cc_file', | |
239 'type': 'none', | |
240 'toolsets':['host'], | |
241 'sources': [ | |
242 '../../sdk/lib/js_util/dartium/js_util_dartium.dart', | |
243 ], | |
244 'actions': [ | |
245 { | |
246 'action_name': 'generate_js_util_cc', | |
247 'inputs': [ | |
248 '../tools/gen_library_src_paths.py', | |
249 '<(builtin_in_cc_file)', | |
250 '<@(_sources)', | |
251 ], | |
252 'outputs': [ | |
253 '<(js_util_cc_file)', | |
254 ], | |
255 'action': [ | |
256 'python', | |
257 'tools/gen_library_src_paths.py', | |
258 '--output', '<(js_util_cc_file)', | |
259 '--input_cc', '<(builtin_in_cc_file)', | |
260 '--include', 'bin/builtin.h', | |
261 '--var_name', 'dart::bin::Builtin::js_util_source_paths_', | |
262 '--library_name', 'dart:js_util', | |
263 '<@(_sources)', | |
264 ], | |
265 'message': 'Generating ''<(js_util_cc_file)'' file.' | |
266 }, | |
267 ] | |
268 }, | |
269 { | |
270 'target_name': 'generate_blink_cc_file', | |
271 'type': 'none', | |
272 'toolsets':['host'], | |
273 'sources': [ | |
274 '../../sdk/lib/_blink/dartium/_blink_dartium.dart', | |
275 ], | |
276 'actions': [ | |
277 { | |
278 'action_name': 'generate_blink_cc', | |
279 'inputs': [ | |
280 '../tools/gen_library_src_paths.py', | |
281 '<(builtin_in_cc_file)', | |
282 '<@(_sources)', | |
283 ], | |
284 'outputs': [ | |
285 '<(blink_cc_file)', | |
286 ], | |
287 'action': [ | |
288 'python', | |
289 'tools/gen_library_src_paths.py', | |
290 '--output', '<(blink_cc_file)', | |
291 '--input_cc', '<(builtin_in_cc_file)', | |
292 '--include', 'bin/builtin.h', | |
293 '--var_name', 'dart::bin::Builtin::_blink_source_paths_', | |
294 '--library_name', 'dart:_blink', | |
295 '<@(_sources)', | |
296 ], | |
297 'message': 'Generating ''<(blink_cc_file)'' file.' | |
298 }, | |
299 ] | |
300 }, | |
301 { | |
302 'target_name': 'generate_indexeddb_cc_file', | |
303 'type': 'none', | |
304 'toolsets':['host'], | |
305 'sources': [ | |
306 '../../sdk/lib/indexed_db/dartium/indexed_db_dartium.dart', | |
307 ], | |
308 'actions': [ | |
309 { | |
310 'action_name': 'generate_indexeddb_cc', | |
311 'inputs': [ | |
312 '../tools/gen_library_src_paths.py', | |
313 '<(builtin_in_cc_file)', | |
314 '<@(_sources)', | |
315 ], | |
316 'outputs': [ | |
317 '<(indexeddb_cc_file)', | |
318 ], | |
319 'action': [ | |
320 'python', | |
321 'tools/gen_library_src_paths.py', | |
322 '--output', '<(indexeddb_cc_file)', | |
323 '--input_cc', '<(builtin_in_cc_file)', | |
324 '--include', 'bin/builtin.h', | |
325 '--var_name', 'dart::bin::Builtin::indexed_db_source_paths_', | |
326 '--library_name', 'dart:indexed_db', | |
327 '<@(_sources)', | |
328 ], | |
329 'message': 'Generating ''<(indexeddb_cc_file)'' file.' | |
330 }, | |
331 ] | |
332 }, | |
333 { | |
334 'target_name': 'generate_cached_patches_cc_file', | |
335 'type': 'none', | |
336 'toolsets':['host'], | |
337 'sources': [ | |
338 '../../sdk/lib/js/dartium/cached_patches.dart', | |
339 ], | |
340 'actions': [ | |
341 { | |
342 'action_name': 'generate_cached_patches_cc', | |
343 'inputs': [ | |
344 '../tools/gen_library_src_paths.py', | |
345 '<(builtin_in_cc_file)', | |
346 '<@(_sources)', | |
347 ], | |
348 'outputs': [ | |
349 '<(cached_patches_cc_file)', | |
350 ], | |
351 'action': [ | |
352 'python', | |
353 'tools/gen_library_src_paths.py', | |
354 '--output', '<(cached_patches_cc_file)', | |
355 '--input_cc', '<(builtin_in_cc_file)', | |
356 '--include', 'bin/builtin.h', | |
357 '--var_name', 'dart::bin::Builtin::cached_patches_source_paths_', | |
358 '--library_name', 'cached_patches.dart', | |
359 '<@(_sources)', | |
360 ], | |
361 'message': 'Generating ''<(cached_patches_cc_file)'' file.' | |
362 }, | |
363 ] | |
364 }, | |
365 { | |
366 'target_name': 'generate_web_gl_cc_file', | |
367 'type': 'none', | |
368 'toolsets':['host'], | |
369 'sources': [ | |
370 '../../sdk/lib/web_gl/dartium/web_gl_dartium.dart', | |
371 ], | |
372 'actions': [ | |
373 { | |
374 'action_name': 'generate_web_gl_cc', | |
375 'inputs': [ | |
376 '../tools/gen_library_src_paths.py', | |
377 '<(builtin_in_cc_file)', | |
378 '<@(_sources)', | |
379 ], | |
380 'outputs': [ | |
381 '<(web_gl_cc_file)', | |
382 ], | |
383 'action': [ | |
384 'python', | |
385 'tools/gen_library_src_paths.py', | |
386 '--output', '<(web_gl_cc_file)', | |
387 '--input_cc', '<(builtin_in_cc_file)', | |
388 '--include', 'bin/builtin.h', | |
389 '--var_name', 'dart::bin::Builtin::web_gl_source_paths_', | |
390 '--library_name', 'dart:web_gl', | |
391 '<@(_sources)', | |
392 ], | |
393 'message': 'Generating ''<(web_gl_cc_file)'' file.' | |
394 }, | |
395 ] | |
396 }, | |
397 { | |
398 'target_name': 'generate_metadata_cc_file', | |
399 'type': 'none', | |
400 'toolsets':['host'], | |
401 'sources': [ | |
402 '../../sdk/lib/html/html_common/metadata.dart', | |
403 ], | |
404 'actions': [ | |
405 { | |
406 'action_name': 'generate_metadata_cc', | |
407 'inputs': [ | |
408 '../tools/gen_library_src_paths.py', | |
409 '<(builtin_in_cc_file)', | |
410 '<@(_sources)', | |
411 ], | |
412 'outputs': [ | |
413 '<(metadata_cc_file)', | |
414 ], | |
415 'action': [ | |
416 'python', | |
417 'tools/gen_library_src_paths.py', | |
418 '--output', '<(metadata_cc_file)', | |
419 '--input_cc', '<(builtin_in_cc_file)', | |
420 '--include', 'bin/builtin.h', | |
421 '--var_name', 'dart::bin::Builtin::metadata_source_paths_', | |
422 '--library_name', 'metadata.dart', | |
423 '<@(_sources)', | |
424 ], | |
425 'message': 'Generating ''<(metadata_cc_file)'' file.' | |
426 }, | |
427 ] | |
428 }, | |
429 { | |
430 'target_name': 'generate_websql_cc_file', | |
431 'type': 'none', | |
432 'toolsets':['host'], | |
433 'sources': [ | |
434 '../../sdk/lib/web_sql/dartium/web_sql_dartium.dart', | |
435 ], | |
436 'actions': [ | |
437 { | |
438 'action_name': 'generate_websql_cc', | |
439 'inputs': [ | |
440 '../tools/gen_library_src_paths.py', | |
441 '<(builtin_in_cc_file)', | |
442 '<@(_sources)', | |
443 ], | |
444 'outputs': [ | |
445 '<(websql_cc_file)', | |
446 ], | |
447 'action': [ | |
448 'python', | |
449 'tools/gen_library_src_paths.py', | |
450 '--output', '<(websql_cc_file)', | |
451 '--input_cc', '<(builtin_in_cc_file)', | |
452 '--include', 'bin/builtin.h', | |
453 '--var_name', 'dart::bin::Builtin::web_sql_source_paths_', | |
454 '--library_name', 'dart:web_sql', | |
455 '<@(_sources)', | |
456 ], | |
457 'message': 'Generating ''<(websql_cc_file)'' file.' | |
458 }, | |
459 ] | |
460 }, | |
461 { | |
462 'target_name': 'generate_svg_cc_file', | |
463 'type': 'none', | |
464 'toolsets':['host'], | |
465 'sources': [ | |
466 '../../sdk/lib/svg/dartium/svg_dartium.dart', | |
467 ], | |
468 'actions': [ | |
469 { | |
470 'action_name': 'generate_svg_cc', | |
471 'inputs': [ | |
472 '../tools/gen_library_src_paths.py', | |
473 '<(builtin_in_cc_file)', | |
474 '<@(_sources)', | |
475 ], | |
476 'outputs': [ | |
477 '<(svg_cc_file)', | |
478 ], | |
479 'action': [ | |
480 'python', | |
481 'tools/gen_library_src_paths.py', | |
482 '--output', '<(svg_cc_file)', | |
483 '--input_cc', '<(builtin_in_cc_file)', | |
484 '--include', 'bin/builtin.h', | |
485 '--var_name', 'dart::bin::Builtin::svg_source_paths_', | |
486 '--library_name', 'dart:svg', | |
487 '<@(_sources)', | |
488 ], | |
489 'message': 'Generating ''<(svg_cc_file)'' file.' | |
490 }, | |
491 ] | |
492 }, | |
493 { | |
494 'target_name': 'generate_webaudio_cc_file', | |
495 'type': 'none', | |
496 'toolsets':['host'], | |
497 'sources': [ | |
498 '../../sdk/lib/web_audio/dartium/web_audio_dartium.dart', | |
499 ], | |
500 'actions': [ | |
501 { | |
502 'action_name': 'generate_webaudio_cc', | |
503 'inputs': [ | |
504 '../tools/gen_library_src_paths.py', | |
505 '<(builtin_in_cc_file)', | |
506 '<@(_sources)', | |
507 ], | |
508 'outputs': [ | |
509 '<(webaudio_cc_file)', | |
510 ], | |
511 'action': [ | |
512 'python', | |
513 'tools/gen_library_src_paths.py', | |
514 '--output', '<(webaudio_cc_file)', | |
515 '--input_cc', '<(builtin_in_cc_file)', | |
516 '--include', 'bin/builtin.h', | |
517 '--var_name', 'dart::bin::Builtin::web_audio_source_paths_', | |
518 '--library_name', 'dart:web_audio', | |
519 '<@(_sources)', | |
520 ], | |
521 'message': 'Generating ''<(webaudio_cc_file)'' file.' | |
522 }, | |
523 ] | |
524 }, | |
525 { | |
526 'target_name': 'libdart_builtin', | |
527 'type': 'static_library', | |
528 'toolsets':['target','host'], | |
529 'dependencies': [ | |
530 'generate_builtin_cc_file#host', | |
531 'generate_io_cc_file#host', | |
532 'generate_io_patch_cc_file#host', | |
533 'generate_html_cc_file#host', | |
534 'generate_html_common_cc_file#host', | |
535 'generate_js_cc_file#host', | |
536 'generate_js_util_cc_file#host', | |
537 'generate_blink_cc_file#host', | |
538 'generate_indexeddb_cc_file#host', | |
539 'generate_cached_patches_cc_file#host', | |
540 'generate_web_gl_cc_file#host', | |
541 'generate_metadata_cc_file#host', | |
542 'generate_websql_cc_file#host', | |
543 'generate_svg_cc_file#host', | |
544 'generate_webaudio_cc_file#host', | |
545 ], | |
546 'include_dirs': [ | |
547 '..', | |
548 ], | |
549 'sources': [ | |
550 'log_android.cc', | |
551 'log_linux.cc', | |
552 'log_macos.cc', | |
553 'log_win.cc', | |
554 ], | |
555 'includes': [ | |
556 'builtin_impl_sources.gypi', | |
557 '../platform/platform_sources.gypi', | |
558 ], | |
559 'sources/': [ | |
560 ['exclude', '_test\\.(cc|h)$'], | |
561 ], | |
562 'conditions': [ | |
563 ['dart_io_support==0', { | |
564 'defines': [ | |
565 'DART_IO_DISABLED', | |
566 ], | |
567 }], | |
568 ['OS=="win"', { | |
569 'sources/' : [ | |
570 ['exclude', 'fdutils.h'], | |
571 ], | |
572 # TODO(antonm): fix the implementation. | |
573 # Current implementation accepts char* strings | |
574 # and therefore fails to compile once _UNICODE is | |
575 # enabled. That should be addressed using -A | |
576 # versions of functions and adding necessary conversions. | |
577 'configurations': { | |
578 'Common_Base': { | |
579 'msvs_configuration_attributes': { | |
580 'CharacterSet': '0', | |
581 }, | |
582 }, | |
583 }, | |
584 }], | |
585 ['OS=="linux"', { | |
586 'link_settings': { | |
587 'libraries': [ | |
588 '-ldl', | |
589 ], | |
590 }, | |
591 }], | |
592 ['OS=="android"', { | |
593 'link_settings': { | |
594 'libraries': [ | |
595 '-ldl', | |
596 ], | |
597 }, | |
598 }], | |
599 ], | |
600 }, | |
601 # This is the same as libdart_builtin, but the io support libraries are | |
602 # never disabled, even when dart_io_support==0. This is so that it can | |
603 # still be usefully linked into gen_snapshot. | |
604 { | |
605 'target_name': 'libdart_builtin_no_disable', | |
606 'type': 'static_library', | |
607 'toolsets':['host'], | |
608 'dependencies': [ | |
609 'generate_builtin_cc_file#host', | |
610 'generate_io_cc_file#host', | |
611 'generate_io_patch_cc_file#host', | |
612 ], | |
613 'include_dirs': [ | |
614 '..', | |
615 ], | |
616 'sources': [ | |
617 'log_android.cc', | |
618 'log_linux.cc', | |
619 'log_macos.cc', | |
620 'log_win.cc', | |
621 ], | |
622 'includes': [ | |
623 'builtin_impl_sources.gypi', | |
624 '../platform/platform_sources.gypi', | |
625 ], | |
626 'sources/': [ | |
627 ['exclude', '_test\\.(cc|h)$'], | |
628 ], | |
629 'conditions': [ | |
630 ['OS=="win"', { | |
631 'sources/' : [ | |
632 ['exclude', 'fdutils.h'], | |
633 ], | |
634 # TODO(antonm): fix the implementation. | |
635 # Current implementation accepts char* strings | |
636 # and therefore fails to compile once _UNICODE is | |
637 # enabled. That should be addressed using -A | |
638 # versions of functions and adding necessary conversions. | |
639 'configurations': { | |
640 'Common_Base': { | |
641 'msvs_configuration_attributes': { | |
642 'CharacterSet': '0', | |
643 }, | |
644 }, | |
645 }, | |
646 }], | |
647 ['OS=="linux"', { | |
648 'link_settings': { | |
649 'libraries': [ | |
650 '-ldl', | |
651 ], | |
652 }, | |
653 }], | |
654 ['OS=="android"', { | |
655 'link_settings': { | |
656 'libraries': [ | |
657 '-ldl', | |
658 ], | |
659 }, | |
660 }], | |
661 ], | |
662 }, | |
663 # This is a combination of libdart_io, libdart_builtin, and vmservice bits. | |
664 # The dart_io is built without support for secure sockets. | |
665 { | |
666 'target_name': 'libvmservice_io', | |
667 'type': 'static_library', | |
668 'toolsets': ['host', 'target'], | |
669 'include_dirs': [ | |
670 '..', | |
671 '../../third_party', | |
672 '../include', | |
673 ], | |
674 'includes': [ | |
675 'io_impl_sources.gypi', | |
676 'builtin_impl_sources.gypi', | |
677 ], | |
678 'dependencies': [ | |
679 'generate_builtin_cc_file#host', | |
680 'generate_io_cc_file#host', | |
681 'generate_io_patch_cc_file#host', | |
682 'generate_snapshot_file#host', | |
683 'generate_resources_cc_file#host', | |
684 'generate_observatory_assets_cc_file#host', | |
685 ], | |
686 'sources': [ | |
687 'builtin_common.cc', | |
688 'builtin_natives.cc', | |
689 'builtin_nolib.cc', | |
690 'builtin.h', | |
691 'dartutils.cc', | |
692 'dartutils.h', | |
693 'io_natives.cc', | |
694 'io_natives.h', | |
695 'log_android.cc', | |
696 'log_linux.cc', | |
697 'log_macos.cc', | |
698 'log_win.cc', | |
699 'vmservice_dartium.h', | |
700 'vmservice_dartium.cc', | |
701 'vmservice_impl.cc', | |
702 'vmservice_impl.h', | |
703 '<(resources_cc_file)', | |
704 '<(observatory_assets_cc_file)', | |
705 ], | |
706 'sources/': [ | |
707 ['exclude', '_test\\.(cc|h)$'], | |
708 ], | |
709 'conditions': [ | |
710 ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', { | |
711 'dependencies': [ | |
712 '../third_party/boringssl/boringssl_dart.gyp:boringssl', | |
713 ], | |
714 }], | |
715 ['dart_io_secure_socket==0 or dart_io_support==0', { | |
716 'defines': [ | |
717 'DART_IO_SECURE_SOCKET_DISABLED' | |
718 ], | |
719 }, { | |
720 'sources': [ | |
721 '../../third_party/root_certificates/root_certificates.cc', | |
722 ], | |
723 }], | |
724 ['OS=="win"', { | |
725 'sources/' : [ | |
726 ['exclude', 'fdutils.h'], | |
727 ], | |
728 # TODO(antonm): fix the implementation. | |
729 # Current implementation accepts char* strings | |
730 # and therefore fails to compile once _UNICODE is | |
731 # enabled. That should be addressed using -A | |
732 # versions of functions and adding necessary conversions. | |
733 'configurations': { | |
734 'Common_Base': { | |
735 'msvs_configuration_attributes': { | |
736 'CharacterSet': '0', | |
737 }, | |
738 }, | |
739 }, | |
740 'link_settings': { | |
741 'libraries': [ '-liphlpapi.lib', '-lws2_32.lib', '-lRpcrt4.lib' ], | |
742 }, | |
743 }], | |
744 ['OS=="mac"', { | |
745 'link_settings': { | |
746 'libraries': [ | |
747 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', | |
748 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework', | |
749 '$(SDKROOT)/System/Library/Frameworks/Security.framework', | |
750 ], | |
751 }, | |
752 }], | |
753 ['OS=="linux"', { | |
754 'link_settings': { | |
755 'libraries': [ | |
756 '-ldl', | |
757 ], | |
758 }, | |
759 }], | |
760 ['OS=="android"', { | |
761 'link_settings': { | |
762 'libraries': [ | |
763 '-ldl', | |
764 ], | |
765 }, | |
766 }], | |
767 ], | |
768 }, | |
769 { | |
770 'target_name': 'libdart_io', | |
771 'type': 'static_library', | |
772 'toolsets': ['host', 'target'], | |
773 'include_dirs': [ | |
774 '..', | |
775 '../../third_party', | |
776 ], | |
777 'includes': [ | |
778 'io_impl_sources.gypi', | |
779 ], | |
780 'sources': [ | |
781 'io_natives.h', | |
782 'io_natives.cc', | |
783 ], | |
784 'conditions': [ | |
785 ['dart_io_support==1', { | |
786 'dependencies': [ | |
787 'bin/zlib.gyp:zlib_dart', | |
788 ], | |
789 }, { # dart_io_support == 0 | |
790 'defines': [ | |
791 'DART_IO_DISABLED', | |
792 'DART_IO_SECURE_SOCKET_DISABLED', | |
793 ], | |
794 }], | |
795 ['dart_io_secure_socket==0', { | |
796 'defines': [ | |
797 'DART_IO_SECURE_SOCKET_DISABLED' | |
798 ], | |
799 }, { | |
800 'sources': [ | |
801 '../../third_party/root_certificates/root_certificates.cc', | |
802 ], | |
803 }], | |
804 ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', { | |
805 'dependencies': [ | |
806 '../third_party/boringssl/boringssl_dart.gyp:boringssl', | |
807 ], | |
808 }], | |
809 ['OS=="win"', { | |
810 'link_settings': { | |
811 'libraries': [ '-liphlpapi.lib' ], | |
812 }, | |
813 # TODO(antonm): fix the implementation. | |
814 # Current implementation accepts char* strings | |
815 # and therefore fails to compile once _UNICODE is | |
816 # enabled. That should be addressed using -A | |
817 # versions of functions and adding necessary conversions. | |
818 'configurations': { | |
819 'Common_Base': { | |
820 'msvs_configuration_attributes': { | |
821 'CharacterSet': '0', | |
822 }, | |
823 }, | |
824 }, | |
825 }], | |
826 ['OS=="mac"', { | |
827 'link_settings': { | |
828 'libraries': [ | |
829 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', | |
830 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework', | |
831 '$(SDKROOT)/System/Library/Frameworks/Security.framework', | |
832 ], | |
833 }, | |
834 }], | |
835 ], | |
836 }, | |
837 # This is the same as libdart_io, but the io support libraries are | |
838 # never disabled, even when dart_io_support==0. This is so that it can | |
839 # still be usefully linked into gen_snapshot. | |
840 { | |
841 'target_name': 'libdart_io_no_disable', | |
842 'type': 'static_library', | |
843 'toolsets': ['host'], | |
844 'include_dirs': [ | |
845 '..', | |
846 '../../third_party', | |
847 ], | |
848 'includes': [ | |
849 'io_impl_sources.gypi', | |
850 ], | |
851 'sources': [ | |
852 'io_natives.h', | |
853 'io_natives.cc', | |
854 ], | |
855 'dependencies': [ | |
856 'bin/zlib.gyp:zlib_dart', | |
857 ], | |
858 'conditions': [ | |
859 ['dart_io_support==0 or dart_io_secure_socket==0', { | |
860 'defines': [ | |
861 'DART_IO_SECURE_SOCKET_DISABLED', | |
862 ], | |
863 }, { | |
864 'sources': [ | |
865 '../../third_party/root_certificates/root_certificates.cc', | |
866 ], | |
867 }], | |
868 ['OS != "mac" and dart_io_support==1 and dart_io_secure_socket==1', { | |
869 'dependencies': [ | |
870 '../third_party/boringssl/boringssl_dart.gyp:boringssl', | |
871 ], | |
872 }], | |
873 ['OS=="win"', { | |
874 'link_settings': { | |
875 'libraries': [ '-liphlpapi.lib' ], | |
876 }, | |
877 # TODO(antonm): fix the implementation. | |
878 # Current implementation accepts char* strings | |
879 # and therefore fails to compile once _UNICODE is | |
880 # enabled. That should be addressed using -A | |
881 # versions of functions and adding necessary conversions. | |
882 'configurations': { | |
883 'Common_Base': { | |
884 'msvs_configuration_attributes': { | |
885 'CharacterSet': '0', | |
886 }, | |
887 }, | |
888 }, | |
889 }], | |
890 ['OS=="mac"', { | |
891 'link_settings': { | |
892 'libraries': [ | |
893 '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework', | |
894 '$(SDKROOT)/System/Library/Frameworks/CoreServices.framework', | |
895 '$(SDKROOT)/System/Library/Frameworks/Security.framework', | |
896 ], | |
897 }, | |
898 }], | |
899 ], | |
900 }, | |
901 { | |
902 'target_name': 'libdart_nosnapshot', | |
903 'type': 'static_library', | |
904 'toolsets':['target','host'], | |
905 'dependencies': [ | |
906 'libdart_lib_nosnapshot', | |
907 'libdart_vm_nosnapshot', | |
908 'libdouble_conversion', | |
909 'generate_version_cc_file#host', | |
910 ], | |
911 'include_dirs': [ | |
912 '..', | |
913 ], | |
914 'sources': [ | |
915 '../include/dart_api.h', | |
916 '../include/dart_mirrors_api.h', | |
917 '../include/dart_native_api.h', | |
918 '../include/dart_tools_api.h', | |
919 '../vm/dart_api_impl.cc', | |
920 '../vm/debugger_api_impl.cc', | |
921 '../vm/mirrors_api_impl.cc', | |
922 '../vm/native_api_impl.cc', | |
923 '<(version_cc_file)', | |
924 ], | |
925 'defines': [ | |
926 'DART_SHARED_LIB', | |
927 'DART_NO_SNAPSHOT', | |
928 'DART_PRECOMPILER', | |
929 ], | |
930 }, | |
931 { | |
932 # Completely statically linked binary for generating snapshots. | |
933 'target_name': 'gen_snapshot', | |
934 'type': 'executable', | |
935 'toolsets':['host'], | |
936 'dependencies': [ | |
937 'generate_resources_cc_file#host', | |
938 'generate_observatory_assets_cc_file#host', | |
939 'libdart_nosnapshot#host', | |
940 # If io is disabled for the VM, we still need it for gen snapshot, so | |
941 # use libdart_builtin and libdart_io that still have io enabled. | |
942 'libdart_builtin_no_disable#host', | |
943 'libdart_io_no_disable#host', | |
944 ], | |
945 'include_dirs': [ | |
946 '..', | |
947 ], | |
948 'sources': [ | |
949 'address_sanitizer.cc', | |
950 'gen_snapshot.cc', | |
951 # Very limited native resolver provided. | |
952 'builtin_gen_snapshot.cc', | |
953 'builtin_common.cc', | |
954 'builtin.cc', | |
955 'builtin.h', | |
956 'dfe.cc', | |
957 'dfe.h', | |
958 'loader.cc', | |
959 'loader.h', | |
960 'platform_android.cc', | |
961 'platform_linux.cc', | |
962 'platform_macos.cc', | |
963 'platform_win.cc', | |
964 'platform.h', | |
965 'vmservice_impl.cc', | |
966 'vmservice_impl.h', | |
967 # Include generated source files. | |
968 '<(builtin_cc_file)', | |
969 '<(io_cc_file)', | |
970 '<(io_patch_cc_file)', | |
971 '<(resources_cc_file)', | |
972 ], | |
973 'defines': [ | |
974 'PLATFORM_DISABLE_SOCKET', | |
975 ], | |
976 'conditions': [ | |
977 ['OS=="win"', { | |
978 'link_settings': { | |
979 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib' ], | |
980 }, | |
981 }], | |
982 ], | |
983 }, | |
984 { | |
985 # Generate snapshot bin file. | |
986 'target_name': 'generate_snapshot_bin', | |
987 'type': 'none', | |
988 'toolsets':['host'], | |
989 'dependencies': [ | |
990 'gen_snapshot#host', | |
991 ], | |
992 'actions': [ | |
993 { | |
994 'action_name': 'generate_snapshot_bin', | |
995 'inputs': [ | |
996 '../tools/create_snapshot_bin.py', | |
997 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', | |
998 ], | |
999 'outputs': [ | |
1000 '<(gen_snapshot_stamp_file)', | |
1001 ], | |
1002 'action': [ | |
1003 'python', | |
1004 'tools/create_snapshot_bin.py', | |
1005 '--executable', | |
1006 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', | |
1007 '--snapshot_kind', 'core', | |
1008 '--vm_output_bin', '<(vm_isolate_snapshot_bin_file)', | |
1009 '--isolate_output_bin', '<(isolate_snapshot_bin_file)', | |
1010 '--timestamp_file', '<(gen_snapshot_stamp_file)', | |
1011 ], | |
1012 'message': 'Generating ''<(vm_isolate_snapshot_bin_file)'' ''<(isolate _snapshot_bin_file)'' files.' | |
1013 }, | |
1014 ], | |
1015 }, | |
1016 { | |
1017 # Generate snapshot file. | |
1018 'target_name': 'generate_snapshot_file', | |
1019 'type': 'none', | |
1020 'toolsets':['host'], | |
1021 'dependencies': [ | |
1022 'generate_snapshot_bin#host', | |
1023 ], | |
1024 'actions': [ | |
1025 { | |
1026 'action_name': 'generate_snapshot_file', | |
1027 'inputs': [ | |
1028 '../tools/create_snapshot_file.py', | |
1029 '<(gen_snapshot_stamp_file)', | |
1030 '<(snapshot_in_cc_file)', | |
1031 ], | |
1032 'outputs': [ | |
1033 '<(snapshot_cc_file)', | |
1034 ], | |
1035 'action': [ | |
1036 'python', | |
1037 'tools/create_snapshot_file.py', | |
1038 '--vm_input_bin', '<(vm_isolate_snapshot_bin_file)', | |
1039 '--input_bin', '<(isolate_snapshot_bin_file)', | |
1040 '--input_cc', '<(snapshot_in_cc_file)', | |
1041 '--output', '<(snapshot_cc_file)', | |
1042 ], | |
1043 'message': 'Generating ''<(snapshot_cc_file)'' file.' | |
1044 }, | |
1045 ] | |
1046 }, | |
1047 { | |
1048 'target_name': 'generate_observatory_assets_cc_file', | |
1049 'type': 'none', | |
1050 'toolsets':['host'], | |
1051 'dependencies': [ | |
1052 'build_observatory#host', | |
1053 ], | |
1054 'actions': [ | |
1055 { | |
1056 'action_name': 'generate_observatory_assets_cc_file', | |
1057 'inputs': [ | |
1058 '../tools/create_archive.py', | |
1059 '<(PRODUCT_DIR)/observatory/deployed/web/index.html' | |
1060 ], | |
1061 'outputs': [ | |
1062 '<(observatory_assets_cc_file)', | |
1063 ], | |
1064 'action': [ | |
1065 'python', | |
1066 'tools/create_archive.py', | |
1067 '--output', '<(observatory_assets_cc_file)', | |
1068 '--tar_output', '<(observatory_assets_tar_file)', | |
1069 '--outer_namespace', 'dart', | |
1070 '--inner_namespace', 'bin', | |
1071 '--name', 'observatory_assets_archive', | |
1072 '--compress', | |
1073 '--client_root', '<(PRODUCT_DIR)/observatory/deployed/web/', | |
1074 ], | |
1075 'message': 'Generating ''<(observatory_assets_cc_file)'' file.' | |
1076 }, | |
1077 ] | |
1078 }, | |
1079 { | |
1080 'target_name': 'generate_resources_cc_file', | |
1081 'type': 'none', | |
1082 'toolsets':['host'], | |
1083 'includes': [ | |
1084 'vmservice/vmservice_sources.gypi', | |
1085 ], | |
1086 'actions': [ | |
1087 { | |
1088 'action_name': 'generate_resources_cc', | |
1089 'inputs': [ | |
1090 '../tools/create_resources.py', | |
1091 '<@(_sources)', | |
1092 ], | |
1093 'outputs': [ | |
1094 '<(resources_cc_file)', | |
1095 ], | |
1096 'action': [ | |
1097 'python', | |
1098 'tools/create_resources.py', | |
1099 '--output', '<(resources_cc_file)', | |
1100 '--outer_namespace', 'dart', | |
1101 '--inner_namespace', 'bin', | |
1102 '--table_name', 'service_bin', | |
1103 '--root_prefix', 'bin/', | |
1104 '<@(_sources)' | |
1105 ], | |
1106 'message': 'Generating ''<(resources_cc_file)'' file.' | |
1107 }, | |
1108 ] | |
1109 }, | |
1110 { | |
1111 # dart binary with a snapshot of corelibs built in. | |
1112 'target_name': 'dart', | |
1113 'type': 'executable', | |
1114 'dependencies': [ | |
1115 'bin/zlib.gyp:zlib_dart', | |
1116 'build_observatory#host', | |
1117 'generate_observatory_assets_cc_file#host', | |
1118 'generate_resources_cc_file#host', | |
1119 'generate_snapshot_file#host', | |
1120 'libdart', | |
1121 'libdart_builtin', | |
1122 'libdart_io', | |
1123 ], | |
1124 'include_dirs': [ | |
1125 '..', | |
1126 '../../third_party/', # Zlib | |
1127 ], | |
1128 'sources': [ | |
1129 'builtin.h', | |
1130 'builtin_common.cc', | |
1131 'builtin_natives.cc', | |
1132 'builtin_nolib.cc', | |
1133 'dfe.cc', | |
1134 'dfe.h', | |
1135 'error_exit.cc', | |
1136 'error_exit.h', | |
1137 'io_natives.h', | |
1138 'loader.cc', | |
1139 'loader.h', | |
1140 'main.cc', | |
1141 'snapshot_utils.cc', | |
1142 'snapshot_utils.h', | |
1143 'vmservice_impl.cc', | |
1144 'vmservice_impl.h', | |
1145 '<(observatory_assets_cc_file)', | |
1146 '<(resources_cc_file)', | |
1147 '<(snapshot_cc_file)', | |
1148 ], | |
1149 'conditions': [ | |
1150 ['OS=="win"', { | |
1151 'link_settings': { | |
1152 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ], | |
1153 }, | |
1154 # Generate an import library on Windows, by exporting a function. | |
1155 # Extensions use this import library to link to the API in dart.exe. | |
1156 'msvs_settings': { | |
1157 'VCLinkerTool': { | |
1158 'AdditionalOptions': [ '/EXPORT:Dart_True' ], | |
1159 }, | |
1160 }, | |
1161 }], | |
1162 ['OS == "linux" and asan == 0 and msan == 0 and tsan == 0', { | |
1163 'dependencies': [ | |
1164 '../third_party/tcmalloc/tcmalloc.gypi:tcmalloc', | |
1165 ], | |
1166 }], | |
1167 ], | |
1168 'configurations': { | |
1169 'Dart_Linux_Base': { | |
1170 # Have the linker add all symbols to the dynamic symbol table | |
1171 # so that extensions can look them up dynamically in the binary. | |
1172 'ldflags': [ | |
1173 '-rdynamic', | |
1174 ], | |
1175 }, | |
1176 }, | |
1177 }, | |
1178 { | |
1179 # dart binary for running precompiled snapshots without the compiler. | |
1180 'target_name': 'dart_precompiled_runtime', | |
1181 'type': 'executable', | |
1182 'dependencies': [ | |
1183 'bin/zlib.gyp:zlib_dart', | |
1184 'build_observatory#host', | |
1185 'generate_observatory_assets_cc_file#host', | |
1186 'generate_resources_cc_file#host', | |
1187 'libdart_builtin', | |
1188 'libdart_io', | |
1189 'libdart_precompiled_runtime', | |
1190 ], | |
1191 'include_dirs': [ | |
1192 '..', | |
1193 '../../third_party/', # Zlib | |
1194 ], | |
1195 'sources': [ | |
1196 'builtin.h', | |
1197 'builtin_common.cc', | |
1198 'builtin_natives.cc', | |
1199 'builtin_nolib.cc', | |
1200 'error_exit.cc', | |
1201 'error_exit.h', | |
1202 'io_natives.h', | |
1203 'main.cc', | |
1204 'loader.cc', | |
1205 'loader.h', | |
1206 'snapshot_empty.cc', | |
1207 'snapshot_utils.cc', | |
1208 'snapshot_utils.h', | |
1209 'vmservice_impl.cc', | |
1210 'vmservice_impl.h', | |
1211 '<(observatory_assets_cc_file)', | |
1212 '<(resources_cc_file)', | |
1213 ], | |
1214 'defines': [ | |
1215 'DART_PRECOMPILED_RUNTIME', | |
1216 ], | |
1217 'conditions': [ | |
1218 ['OS=="win"', { | |
1219 'link_settings': { | |
1220 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ], | |
1221 }, | |
1222 # Generate an import library on Windows, by exporting a function. | |
1223 # Extensions use this import library to link to the API in dart.exe. | |
1224 'msvs_settings': { | |
1225 'VCLinkerTool': { | |
1226 'AdditionalOptions': [ '/EXPORT:Dart_True' ], | |
1227 }, | |
1228 }, | |
1229 }], | |
1230 ], | |
1231 }, | |
1232 { | |
1233 # dart binary built for the host. It does not use a snapshot | |
1234 # and does not include Observatory. | |
1235 'target_name': 'dart_bootstrap', | |
1236 'type': 'executable', | |
1237 'toolsets':['host'], | |
1238 'dependencies': [ | |
1239 'generate_resources_cc_file#host', | |
1240 'libdart_builtin', | |
1241 'libdart_io', | |
1242 'libdart_nosnapshot', | |
1243 ], | |
1244 'include_dirs': [ | |
1245 '..', | |
1246 ], | |
1247 'sources': [ | |
1248 'builtin.cc', | |
1249 'builtin.h', | |
1250 'builtin_common.cc', | |
1251 'builtin_natives.cc', | |
1252 'dfe.cc', | |
1253 'dfe.h', | |
1254 'error_exit.cc', | |
1255 'error_exit.h', | |
1256 'io_natives.h', | |
1257 'loader.cc', | |
1258 'loader.h', | |
1259 'main.cc', | |
1260 'observatory_assets_empty.cc', | |
1261 'snapshot_empty.cc', | |
1262 'snapshot_utils.cc', | |
1263 'snapshot_utils.h', | |
1264 'vmservice_impl.cc', | |
1265 'vmservice_impl.h', | |
1266 # Include generated source files. | |
1267 '<(builtin_cc_file)', | |
1268 '<(io_cc_file)', | |
1269 '<(io_patch_cc_file)', | |
1270 '<(html_cc_file)', | |
1271 '<(html_common_cc_file)', | |
1272 '<(js_cc_file)', | |
1273 '<(js_util_cc_file)', | |
1274 '<(blink_cc_file)', | |
1275 '<(indexeddb_cc_file)', | |
1276 '<(cached_patches_cc_file)', | |
1277 '<(web_gl_cc_file)', | |
1278 '<(metadata_cc_file)', | |
1279 '<(websql_cc_file)', | |
1280 '<(svg_cc_file)', | |
1281 '<(webaudio_cc_file)', | |
1282 | |
1283 '<(resources_cc_file)', | |
1284 ], | |
1285 'defines': [ | |
1286 'DART_NO_SNAPSHOT', | |
1287 'DART_PRECOMPILER', | |
1288 ], | |
1289 'conditions': [ | |
1290 ['OS=="win"', { | |
1291 'link_settings': { | |
1292 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ], | |
1293 }, | |
1294 # Generate an import library on Windows, by exporting a function. | |
1295 # Extensions use this import library to link to the API in dart.exe. | |
1296 'msvs_settings': { | |
1297 'VCLinkerTool': { | |
1298 'AdditionalOptions': [ '/EXPORT:Dart_True' ], | |
1299 }, | |
1300 }, | |
1301 }], | |
1302 ], | |
1303 'configurations': { | |
1304 'Dart_Linux_Base': { | |
1305 # Have the linker add all symbols to the dynamic symbol table | |
1306 # so that extensions can look them up dynamically in the binary. | |
1307 'ldflags': [ | |
1308 '-rdynamic', | |
1309 ], | |
1310 }, | |
1311 }, | |
1312 }, | |
1313 { | |
1314 'target_name': 'process_test', | |
1315 'type': 'executable', | |
1316 'sources': [ | |
1317 'process_test.cc', | |
1318 ] | |
1319 }, | |
1320 { | |
1321 'target_name': 'run_vm_tests', | |
1322 'type': 'executable', | |
1323 'dependencies': [ | |
1324 'libdart', | |
1325 'libdart_builtin', | |
1326 'libdart_io', | |
1327 'generate_snapshot_file#host', | |
1328 'generate_snapshot_test_dat_file#host', | |
1329 ], | |
1330 'include_dirs': [ | |
1331 '..', | |
1332 '<(gen_source_dir)', | |
1333 ], | |
1334 'sources': [ | |
1335 'run_vm_tests.cc', | |
1336 'error_exit.cc', | |
1337 'error_exit.h', | |
1338 'builtin_common.cc', | |
1339 'builtin_natives.cc', | |
1340 'builtin_nolib.cc', | |
1341 'builtin.h', | |
1342 'dfe.cc', | |
1343 'dfe.h', | |
1344 'io_natives.h', | |
1345 'loader.cc', | |
1346 'loader.h', | |
1347 'snapshot_utils.cc', | |
1348 'snapshot_utils.h', | |
1349 # Include generated source files. | |
1350 '<(snapshot_cc_file)', | |
1351 '<(builtin_cc_file)', | |
1352 '<(io_cc_file)', | |
1353 '<(io_patch_cc_file)', | |
1354 ], | |
1355 'includes': [ | |
1356 'builtin_impl_sources.gypi', | |
1357 '../platform/platform_sources.gypi', | |
1358 '../vm/vm_sources.gypi', | |
1359 ], | |
1360 'defines': [ | |
1361 'TESTING', | |
1362 ], | |
1363 # Only include _test.[cc|h] files. | |
1364 'sources/': [ | |
1365 ['exclude', '\\.(cc|h)$'], | |
1366 ['include', 'run_vm_tests.cc'], | |
1367 ['include', 'error_exit.cc'], | |
1368 ['include', 'builtin_nolib.cc'], | |
1369 ['include', 'builtin_natives.cc'], | |
1370 ['include', 'snapshot_utils.cc'], | |
1371 ['include', '_gen\\.cc$'], | |
1372 ['include', '_test\\.(cc|h)$'], | |
1373 ], | |
1374 'conditions': [ | |
1375 ['OS=="win"', { | |
1376 'link_settings': { | |
1377 'libraries': [ '-lws2_32.lib', '-lRpcrt4.lib', '-lwinmm.lib' ], | |
1378 }, | |
1379 }], | |
1380 ['OS == "linux" and asan == 0 and msan == 0 and tsan == 0', { | |
1381 'dependencies': [ | |
1382 '../third_party/tcmalloc/tcmalloc.gypi:tcmalloc', | |
1383 ], | |
1384 }], | |
1385 ], | |
1386 'configurations': { | |
1387 'Dart_Linux_Base': { | |
1388 # Have the linker add all symbols to the dynamic symbol table | |
1389 # so that extensions can look them up dynamically in the binary. | |
1390 'ldflags': [ | |
1391 '-rdynamic', | |
1392 ], | |
1393 }, | |
1394 }, | |
1395 }, | |
1396 { | |
1397 'target_name': 'test_extension', | |
1398 'type': 'shared_library', | |
1399 'dependencies': [ | |
1400 'dart', | |
1401 ], | |
1402 'include_dirs': [ | |
1403 '..', | |
1404 ], | |
1405 'cflags!': [ | |
1406 '-Wnon-virtual-dtor', | |
1407 '-Woverloaded-virtual', | |
1408 '-fno-rtti', | |
1409 '-fvisibility-inlines-hidden', | |
1410 '-Wno-conversion-null', | |
1411 ], | |
1412 'sources': [ | |
1413 'test_extension.c', | |
1414 'test_extension_dllmain_win.cc', | |
1415 ], | |
1416 'defines': [ | |
1417 # The only effect of DART_SHARED_LIB is to export the Dart API. | |
1418 'DART_SHARED_LIB', | |
1419 ], | |
1420 'conditions': [ | |
1421 ['OS=="win"', { | |
1422 'msvs_settings': { | |
1423 'VCLinkerTool': { | |
1424 'AdditionalDependencies': [ 'dart.lib' ], | |
1425 'AdditionalLibraryDirectories': [ '<(PRODUCT_DIR)' ], | |
1426 }, | |
1427 }, | |
1428 }], | |
1429 ['OS=="mac"', { | |
1430 'xcode_settings': { | |
1431 'OTHER_LDFLAGS': [ '-undefined', 'dynamic_lookup' ], | |
1432 }, | |
1433 }], | |
1434 ['OS=="linux"', { | |
1435 'cflags': [ | |
1436 '-fPIC', | |
1437 ], | |
1438 }], | |
1439 ], | |
1440 }, | |
1441 ], | |
1442 } | |
OLD | NEW |