424 """Adds arguments that will change the default GN arguments."""
425
426 parser.add_argument('--rbe', help='Use rbe', action='store_true')
427 parser.add_argument('--no-rbe',
428 help='Disable rbe',
429 dest='rbe',
430 action='store_false')
431 parser.set_defaults(rbe=os.environ.get('RBE') == '1' or \
432 os.environ.get('DART_RBE') == '1' or \
433 os.environ.get('RBE_cfg') != None)
434 parser.add_argument('--rbe-expensive-exec-strategy',
435 default=os.environ.get('RBE_exec_strategy'),
436 help='Strategy for expensive RBE compilations',
437 type=str)
438
439
440
441 parser.add_argument('--verify-sdk-hash',
442 help='Enable SDK hash checks',
443 dest='verify_sdk_hash',
444 action='store_true')
445 parser.add_argument('-nvh',
446 '--no-verify-sdk-hash',
447 help='Disable SDK hash checks',
448 dest='verify_sdk_hash',
449 action='store_false')
450 parser.set_defaults(verify_sdk_hash=None)
451
452 parser.add_argument('--git-version',
453 help='Enable git commit in version',
454 dest='git_version',
455 action='store_true')
456 parser.add_argument('-ngv',
457 '--no-git-version',
458 help='Disable git commit in version',
459 dest='git_version',
460 action='store_false')
461 parser.set_defaults(git_version=None)
462
463 parser.add_argument('--clang', help='Use Clang', action='store_true')
464 parser.add_argument('--no-clang',
465 help='Disable Clang',
466 dest='clang',
467 action='store_false')
468 parser.set_defaults(clang=True)
469
470 parser.add_argument(
471 '--platform-sdk',
472 help='Directs the create_sdk target to create a smaller "Platform" SDK',
474 action='store_true')
475 parser.add_argument('--use-crashpad',
476 default=False,
477 dest='use_crashpad',
478 action='store_true')
479 parser.add_argument('--use-qemu',
480 default=False,
481 dest='use_qemu',
482 action='store_true')
483 parser.add_argument('--exclude-kernel-service',
484 help='Exclude the kernel service.',
485 default=False,
486 dest='exclude_kernel_service',
487 action='store_true')
488 parser.add_argument('--arm-float-abi',
489 type=str,
490 help='The ARM float ABI (soft, softfp, hard)',
491 metavar='[soft,softfp,hard]',
492 default='')
493
494 parser.add_argument('--code-coverage',
495 help='Enable code coverage for the standalone VM',
496 default=False,
497 dest="code_coverage",
498 action='store_true')
499 parser.add_argument('--debug-opt-level',
500 '-d',
501 help='The optimization level to use for debug builds',
502 type=str)
503 parser.add_argument('--gn-args',
504 help='Set extra GN args',
505 dest='gn_args',
506 action='append')
507 parser.add_argument(
508 '--toolchain-prefix',
509 '-t',
510 type=str,
511 help='Comma-separated list of arch=/path/to/toolchain-prefix mappings')
512 parser.add_argument('--ide',
513 help='Generate an IDE file.',
515 action='store_true')
516 parser.add_argument('--export-compile-commands',
517 help='Export compile_commands.json database file.',
518 default=False,
519 action='store_true')
520 parser.add_argument(
521 '--target-sysroot',
522 '-s',
523 type=str,
524 help='Comma-separated list of arch=/path/to/sysroot mappings')
525 parser.add_argument('--use-mallinfo2',
526 help='Use mallinfo2 to collect malloc stats.',
527 default=False,
528 dest='use_mallinfo2',
529 action='store_true')
530 parser.add_argument('--codesigning-identity',
531 help='Sign executables using the given identity.',
532 default='',
533 type=str)
534
535
def AddCommonGnOptionArgs(parser)