Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 # BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 { | 5 { |
| 6 'variables': { | 6 'variables': { |
| 7 'io_cc_file': '<(SHARED_INTERMEDIATE_DIR)/io_gen.cc', | 7 'gen_source_dir': '<(LIB_DIR)', |
|
ahe
2013/04/15 18:30:40
Why are the sources going in LIB_DIR?
zra
2013/04/15 18:47:00
SHARED_INTERMEDIATE_DIR isn't toolset specific, wh
| |
| 8 'io_patch_cc_file': '<(SHARED_INTERMEDIATE_DIR)/io_patch_gen.cc', | 8 'io_cc_file': '<(gen_source_dir)/io_gen.cc', |
| 9 'io_patch_cc_file': '<(gen_source_dir)/io_patch_gen.cc', | |
| 9 'builtin_in_cc_file': 'builtin_in.cc', | 10 'builtin_in_cc_file': 'builtin_in.cc', |
| 10 'builtin_cc_file': '<(SHARED_INTERMEDIATE_DIR)/builtin_gen.cc', | 11 'builtin_cc_file': '<(gen_source_dir)/builtin_gen.cc', |
| 11 'snapshot_in_cc_file': 'snapshot_in.cc', | 12 'snapshot_in_cc_file': 'snapshot_in.cc', |
| 12 'snapshot_bin_file': '<(SHARED_INTERMEDIATE_DIR)/snapshot_gen.bin', | 13 'snapshot_bin_file': '<(gen_source_dir)/snapshot_gen.bin', |
| 14 'resources_cc_file': '<(gen_source_dir)/resources_gen.cc', | |
| 15 | |
| 16 # The program that creates snapshot_gen.cc is only built and run on the | |
| 17 # host, but it must be available when dart is built for the target. Thus, | |
| 18 # we keep it in a shared location. | |
| 13 'snapshot_cc_file': '<(SHARED_INTERMEDIATE_DIR)/snapshot_gen.cc', | 19 'snapshot_cc_file': '<(SHARED_INTERMEDIATE_DIR)/snapshot_gen.cc', |
| 14 'resources_cc_file': '<(SHARED_INTERMEDIATE_DIR)/resources_gen.cc', | |
| 15 }, | 20 }, |
| 16 'targets': [ | 21 'targets': [ |
| 17 { | 22 { |
| 18 'target_name': 'generate_builtin_cc_file', | 23 'target_name': 'generate_builtin_cc_file', |
| 19 'type': 'none', | 24 'type': 'none', |
| 25 'toolsets':['target','host'], | |
| 20 'includes': [ | 26 'includes': [ |
| 21 'builtin_sources.gypi', | 27 'builtin_sources.gypi', |
| 22 ], | 28 ], |
| 23 'actions': [ | 29 'actions': [ |
| 24 { | 30 { |
| 25 'action_name': 'generate_builtin_cc', | 31 'action_name': 'generate_builtin_cc', |
| 26 'inputs': [ | 32 'inputs': [ |
| 27 '../tools/create_string_literal.py', | 33 '../tools/create_string_literal.py', |
| 28 '<(builtin_in_cc_file)', | 34 '<(builtin_in_cc_file)', |
| 29 '<@(_sources)', | 35 '<@(_sources)', |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 40 '--var_name', 'Builtin::builtin_source_', | 46 '--var_name', 'Builtin::builtin_source_', |
| 41 '<@(_sources)', | 47 '<@(_sources)', |
| 42 ], | 48 ], |
| 43 'message': 'Generating ''<(builtin_cc_file)'' file.' | 49 'message': 'Generating ''<(builtin_cc_file)'' file.' |
| 44 }, | 50 }, |
| 45 ] | 51 ] |
| 46 }, | 52 }, |
| 47 { | 53 { |
| 48 'target_name': 'generate_io_cc_file', | 54 'target_name': 'generate_io_cc_file', |
| 49 'type': 'none', | 55 'type': 'none', |
| 56 'toolsets':['target','host'], | |
| 50 'variables': { | 57 'variables': { |
| 51 'io_dart': '<(SHARED_INTERMEDIATE_DIR)/io_gen.dart', | 58 'io_dart': '<(gen_source_dir)/io_gen.dart', |
| 52 }, | 59 }, |
| 53 'sources': [ | 60 'sources': [ |
| 54 'io.dart', | 61 'io.dart', |
| 55 ], | 62 ], |
| 56 'includes': [ | 63 'includes': [ |
| 57 '../../sdk/lib/io/iolib_sources.gypi', | 64 '../../sdk/lib/io/iolib_sources.gypi', |
| 58 ], | 65 ], |
| 59 'actions': [ | 66 'actions': [ |
| 60 { | 67 { |
| 61 'action_name': 'generate_io_dart', | 68 'action_name': 'generate_io_dart', |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 92 '--var_name', 'Builtin::io_source_', | 99 '--var_name', 'Builtin::io_source_', |
| 93 '<(io_dart)', | 100 '<(io_dart)', |
| 94 ], | 101 ], |
| 95 'message': 'Generating ''<(io_cc_file)'' file.' | 102 'message': 'Generating ''<(io_cc_file)'' file.' |
| 96 }, | 103 }, |
| 97 ] | 104 ] |
| 98 }, | 105 }, |
| 99 { | 106 { |
| 100 'target_name': 'generate_io_patch_cc_file', | 107 'target_name': 'generate_io_patch_cc_file', |
| 101 'type': 'none', | 108 'type': 'none', |
| 109 'toolsets':['target','host'], | |
| 102 'includes': [ | 110 'includes': [ |
| 103 'io_sources.gypi', | 111 'io_sources.gypi', |
| 104 ], | 112 ], |
| 105 'actions': [ | 113 'actions': [ |
| 106 { | 114 { |
| 107 'action_name': 'generate_io_patch_cc', | 115 'action_name': 'generate_io_patch_cc', |
| 108 'inputs': [ | 116 'inputs': [ |
| 109 '../tools/create_string_literal.py', | 117 '../tools/create_string_literal.py', |
| 110 '<(builtin_in_cc_file)', | 118 '<(builtin_in_cc_file)', |
| 111 '<@(_sources)', | 119 '<@(_sources)', |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 122 '--var_name', 'Builtin::io_patch_', | 130 '--var_name', 'Builtin::io_patch_', |
| 123 '<@(_sources)', | 131 '<@(_sources)', |
| 124 ], | 132 ], |
| 125 'message': 'Generating ''<(io_patch_cc_file)'' file.' | 133 'message': 'Generating ''<(io_patch_cc_file)'' file.' |
| 126 }, | 134 }, |
| 127 ] | 135 ] |
| 128 }, | 136 }, |
| 129 { | 137 { |
| 130 'target_name': 'libdart_builtin', | 138 'target_name': 'libdart_builtin', |
| 131 'type': 'static_library', | 139 'type': 'static_library', |
| 140 'toolsets':['target','host'], | |
| 132 'dependencies': [ | 141 'dependencies': [ |
| 133 'generate_builtin_cc_file', | 142 'generate_builtin_cc_file', |
| 134 'generate_io_cc_file', | 143 'generate_io_cc_file', |
| 135 'generate_io_patch_cc_file', | 144 'generate_io_patch_cc_file', |
| 136 ], | 145 ], |
| 137 'include_dirs': [ | 146 'include_dirs': [ |
| 138 '..', | 147 '..', |
| 139 ], | 148 ], |
| 140 'sources': [ | 149 'sources': [ |
| 141 'builtin_natives.cc', | 150 'builtin_natives.cc', |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 211 'CharacterSet': '0', | 220 'CharacterSet': '0', |
| 212 }, | 221 }, |
| 213 }, | 222 }, |
| 214 }, | 223 }, |
| 215 }], | 224 }], |
| 216 ], | 225 ], |
| 217 }, | 226 }, |
| 218 { | 227 { |
| 219 'target_name': 'libdart_withcore', | 228 'target_name': 'libdart_withcore', |
| 220 'type': 'static_library', | 229 'type': 'static_library', |
| 230 'toolsets':['target','host'], | |
| 221 'dependencies': [ | 231 'dependencies': [ |
| 222 'libdart_lib_withcore', | 232 'libdart_lib_withcore', |
| 223 'libdart_vm', | 233 'libdart_vm', |
| 224 'libjscre', | 234 'libjscre', |
| 225 'libdouble_conversion', | 235 'libdouble_conversion', |
| 226 'generate_version_cc_file', | 236 'generate_version_cc_file', |
| 227 ], | 237 ], |
| 228 'include_dirs': [ | 238 'include_dirs': [ |
| 229 '..', | 239 '..', |
| 230 ], | 240 ], |
| 231 'sources': [ | 241 'sources': [ |
| 232 '../include/dart_api.h', | 242 '../include/dart_api.h', |
| 233 '../include/dart_debugger_api.h', | 243 '../include/dart_debugger_api.h', |
| 234 '../vm/dart_api_impl.cc', | 244 '../vm/dart_api_impl.cc', |
| 235 '../vm/debugger_api_impl.cc', | 245 '../vm/debugger_api_impl.cc', |
| 236 '<(version_cc_file)', | 246 '<(version_cc_file)', |
| 237 ], | 247 ], |
| 238 'defines': [ | 248 'defines': [ |
| 239 'DART_SHARED_LIB', | 249 'DART_SHARED_LIB', |
| 240 ], | 250 ], |
| 241 }, | 251 }, |
| 242 { | 252 { |
| 243 # Completely statically linked binary for generating snapshots. | 253 # Completely statically linked binary for generating snapshots. |
| 244 'target_name': 'gen_snapshot', | 254 'target_name': 'gen_snapshot', |
| 245 'type': 'executable', | 255 'type': 'executable', |
| 256 'toolsets':['host'], | |
| 246 'dependencies': [ | 257 'dependencies': [ |
| 247 'libdart_withcore', | 258 'libdart_withcore', |
| 248 'libdart_builtin', | 259 'libdart_builtin', |
| 249 ], | 260 ], |
| 250 'include_dirs': [ | 261 'include_dirs': [ |
| 251 '..', | 262 '..', |
| 252 ], | 263 ], |
| 253 'sources': [ | 264 'sources': [ |
| 254 'gen_snapshot.cc', | 265 'gen_snapshot.cc', |
| 255 # Only looks up native functions in libdart_builtin, not libdart_io. | 266 # Only looks up native functions in libdart_builtin, not libdart_io. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 269 'link_settings': { | 280 'link_settings': { |
| 270 'libraries': [ '-llog' ], | 281 'libraries': [ '-llog' ], |
| 271 }, | 282 }, |
| 272 }] | 283 }] |
| 273 ], | 284 ], |
| 274 }, | 285 }, |
| 275 { | 286 { |
| 276 # Generate snapshot bin file. | 287 # Generate snapshot bin file. |
| 277 'target_name': 'generate_snapshot_bin', | 288 'target_name': 'generate_snapshot_bin', |
| 278 'type': 'none', | 289 'type': 'none', |
| 290 'toolsets':['host'], | |
| 279 'dependencies': [ | 291 'dependencies': [ |
| 280 'gen_snapshot', | 292 'gen_snapshot#host', |
| 281 ], | 293 ], |
| 282 'actions': [ | 294 'actions': [ |
| 283 { | 295 { |
| 284 'action_name': 'generate_snapshot_bin', | 296 'action_name': 'generate_snapshot_bin', |
| 285 'inputs': [ | 297 'inputs': [ |
| 286 '../tools/create_snapshot_bin.py', | 298 '../tools/create_snapshot_bin.py', |
| 287 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', | 299 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', |
| 288 ], | 300 ], |
| 289 'outputs': [ | 301 'outputs': [ |
| 290 '<(snapshot_bin_file)', | 302 '<(snapshot_bin_file)', |
| 291 ], | 303 ], |
| 292 'action': [ | 304 'action': [ |
| 293 'python', | 305 'python', |
| 294 'tools/create_snapshot_bin.py', | 306 'tools/create_snapshot_bin.py', |
| 295 '--executable', | 307 '--executable', |
| 296 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', | 308 '<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)gen_snapshot<(EXECUTABLE_SUFFIX) ', |
| 297 '--output_bin', '<(snapshot_bin_file)', | 309 '--output_bin', '<(snapshot_bin_file)', |
| 298 '--target_os', '<(OS)' | 310 '--target_os', '<(OS)' |
| 299 ], | 311 ], |
| 300 'message': 'Generating ''<(snapshot_bin_file)'' file.' | 312 'message': 'Generating ''<(snapshot_bin_file)'' file.' |
| 301 }, | 313 }, |
| 302 ], | 314 ], |
| 303 }, | 315 }, |
| 304 { | 316 { |
| 305 # Generate snapshot file. | 317 # Generate snapshot file. |
| 306 'target_name': 'generate_snapshot_file', | 318 'target_name': 'generate_snapshot_file', |
| 307 'type': 'none', | 319 'type': 'none', |
| 320 'toolsets':['host'], | |
| 308 'dependencies': [ | 321 'dependencies': [ |
| 309 'generate_snapshot_bin', | 322 'generate_snapshot_bin#host', |
| 310 ], | 323 ], |
| 311 'actions': [ | 324 'actions': [ |
| 312 { | 325 { |
| 313 'action_name': 'generate_snapshot_file', | 326 'action_name': 'generate_snapshot_file', |
| 314 'inputs': [ | 327 'inputs': [ |
| 315 '../tools/create_snapshot_file.py', | 328 '../tools/create_snapshot_file.py', |
| 316 '<(snapshot_in_cc_file)', | 329 '<(snapshot_in_cc_file)', |
| 317 '<(snapshot_bin_file)' | 330 '<(snapshot_bin_file)' |
| 318 ], | 331 ], |
| 319 'outputs': [ | 332 'outputs': [ |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 ] | 371 ] |
| 359 }, | 372 }, |
| 360 { | 373 { |
| 361 # dart binary with a snapshot of corelibs built in. | 374 # dart binary with a snapshot of corelibs built in. |
| 362 'target_name': 'dart', | 375 'target_name': 'dart', |
| 363 'type': 'executable', | 376 'type': 'executable', |
| 364 'dependencies': [ | 377 'dependencies': [ |
| 365 'libdart', | 378 'libdart', |
| 366 'libdart_builtin', | 379 'libdart_builtin', |
| 367 'libdart_io', | 380 'libdart_io', |
| 368 'generate_snapshot_file', | 381 'generate_snapshot_file#host', |
| 369 'generate_resources_cc_file', | 382 'generate_resources_cc_file', |
| 370 ], | 383 ], |
| 371 'include_dirs': [ | 384 'include_dirs': [ |
| 372 '..', | 385 '..', |
| 373 ], | 386 ], |
| 374 'sources': [ | 387 'sources': [ |
| 375 'main.cc', | 388 'main.cc', |
| 376 'builtin_nolib.cc', | 389 'builtin_nolib.cc', |
| 377 'resources.h', | 390 'resources.h', |
| 378 'vmstats.h', | 391 'vmstats.h', |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 'target_name': 'run_vm_tests', | 476 'target_name': 'run_vm_tests', |
| 464 'type': 'executable', | 477 'type': 'executable', |
| 465 'dependencies': [ | 478 'dependencies': [ |
| 466 'libdart_withcore', | 479 'libdart_withcore', |
| 467 'libdart_builtin', | 480 'libdart_builtin', |
| 468 'libdart_io', | 481 'libdart_io', |
| 469 'generate_snapshot_test_dat_file', | 482 'generate_snapshot_test_dat_file', |
| 470 ], | 483 ], |
| 471 'include_dirs': [ | 484 'include_dirs': [ |
| 472 '..', | 485 '..', |
| 473 '<(SHARED_INTERMEDIATE_DIR)', | 486 '<(gen_source_dir)', |
| 474 ], | 487 ], |
| 475 'sources': [ | 488 'sources': [ |
| 476 'run_vm_tests.cc', | 489 'run_vm_tests.cc', |
| 477 'builtin.cc', | 490 'builtin.cc', |
| 478 # Include generated source files. | 491 # Include generated source files. |
| 479 '<(builtin_cc_file)', | 492 '<(builtin_cc_file)', |
| 480 '<(io_cc_file)', | 493 '<(io_cc_file)', |
| 481 '<(io_patch_cc_file)', | 494 '<(io_patch_cc_file)', |
| 482 ], | 495 ], |
| 483 'includes': [ | 496 'includes': [ |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 538 ['OS=="linux"', { | 551 ['OS=="linux"', { |
| 539 'cflags': [ | 552 'cflags': [ |
| 540 '-fPIC', | 553 '-fPIC', |
| 541 ], | 554 ], |
| 542 }], | 555 }], |
| 543 ], | 556 ], |
| 544 }, | 557 }, |
| 545 ], | 558 ], |
| 546 } | 559 } |
| 547 | 560 |
| OLD | NEW |