def main(): parser = argparse.ArgumentParser() parser.add_argument('--verbose', '-v', action='store_true') download_package_util_flags.add_extra_flags(parser) args = parser.parse_args(sys.argv[1:]) if args.verbose: logging.getLogger().setLevel(logging.INFO) check_and_perform_updates(args.download_cache_path, args.download_cache_size)
def main(args): parser = argparse.ArgumentParser() parser.add_argument('-v', '--verbose', action='store_true', help='Emit ' 'verbose output.') parser.add_argument('-r', '--roll-forward', dest='roll', action='store_true', help='Update pinned NaCl SDK manifest version to the ' 'latest..') download_package_util_flags.add_extra_flags(parser) args = parser.parse_args(args) logging_util.setup(level=logging.DEBUG if args.verbose else logging.WARNING) if args.roll: roll_pinned_manifest_forward() check_and_perform_updates(args.download_cache_path, args.download_cache_size)
def main(args): parser = argparse.ArgumentParser() parser.add_argument('-v', '--verbose', action='store_true', help='Emit ' 'verbose output.') parser.add_argument('-r', '--roll-forward', dest='roll', action='store_true', help='Update pinned NaCl SDK manifest version to the ' 'latest..') download_package_util_flags.add_extra_flags(parser) args = parser.parse_args(args) logging_util.setup( level=logging.DEBUG if args.verbose else logging.WARNING) if args.roll: roll_pinned_manifest_forward() check_and_perform_updates(args.download_cache_path, args.download_cache_size)
def parse(self, args): parser = argparse.ArgumentParser( usage=os.path.basename(sys.argv[0]) + ' <options>', epilog=_Options._help_epilog(), formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('--cc-wrapper', metavar='[cc-wrapper]', help='Compiler wrapper used by goma') parser.add_argument('--chrometype', '-c', choices=_ALLOWED_CHROMETYPES, default=_DEFAULT_CHROMETYPE, type=_Options._parse_chrometype, help='Indicates Chrome type.') parser.add_argument('--configure-jobs', '-j', default=None, type=int, metavar='jobs', help='Max number of parellel jobs run during ' 'configure. Defaults to number of CPUs. Set to 0 to ' 'force configure to run in a single process which can ' 'aid in diagnosing failures.') parser.add_argument('--disable-art-aot', action='store_false', dest='enable_art_aot', help='Disable ART boot image ' 'and AOT compilation.') parser.add_argument('--disable-config-cache', action='store_false', dest='enable_config_cache', help='Disable configuration cache.') parser.add_argument('--disable-debug-info', action='store_true', help='Do not generate debug information. ') parser.add_argument('--disable-debug-code', action='store_true', help='Skip debug logging / assertions.') parser.add_argument('--disable-goma', action='store_true', help='Do not use goma to build.') parser.add_argument('--disable-hwui', action='store_true', help='Disable the use of hardware accelerated ' 'rendering in the Android UI code.') parser.add_argument('--disable-method-whitelist', action='store_false', dest='enable_method_whitelist', help='Disable method whitelist for boot.oat. ' 'This also changes the compiler filter to ' '"everything", which will require adjustments to the ' 'executable section address to be able to run.') parser.add_argument('--enable-aacenc', action='store_true', help='Build libraries to support AAC encoding.') parser.add_argument('--enable-atrace', action='store_true', help='Enable Android trace events through Chromium') parser.add_argument('--enable-binder', action='store_true', help='Enable Binder calls for all services.') parser.add_argument('--enable-jemalloc-debug', action='store_true', help='Enable jemalloc debug mode. This fills all ' 'memory returned from malloc() and all memory passed ' 'to free() with garbage.') parser.add_argument('--enable-touch-overlay', action='store_true', help='[EXPERIMENTAL] Overlay touch spots on the ' 'screen in the plugin after the app renders.') parser.add_argument('--enable-valgrind', action='store_true', help='Run unit tests under Valgrind.') parser.add_argument('--goma-dir', help='The directory for goma.') parser.add_argument('--java-dir', default='/usr/lib/jvm/java-7-openjdk-amd64', help='The directory for Java. The path ' 'points to a directory, which usually JAVA_HOME env ' 'variable points to. E.g. ' '/usr/lib/jvm/java-7-openjdk-amd64 for Ubuntu.') parser.add_argument('--logging', metavar=str(_ALLOWED_LOGGING), help='A comma-separated list of logging to enable on ' 'build.') parser.add_argument('--notest', action='store_false', dest='run_tests', help='Disable automatic running of unit tests during ' 'build.') parser.add_argument('--official-build', action='store_true', help='Set configure options for an official Runtime ' 'build.') parser.add_argument('--opt', '-O', action='store_true', help='Enable optimizations.') parser.add_argument('--internal-apks-source', choices=_ALLOWED_INTERNAL_APKS_SOURCES, default=_DEFAULT_INTERNAL_APKS_SOURCES, help='Source of play-services and ' 'GoogleContactsSyncAdapter APKs. \'prebuilt\' is the ' 'default and it requires production server access.') parser.add_argument('--regen-build-prop', action='store_true', help='Forces regeneration of the build.prop file ' 'which contains git HEAD information for release ' 'purposes. Pass this option to make sure the file is ' 'up to date. Note: requires rebuilding the rootfs.') parser.add_argument('--restart-goma', action='store_true', help='Restart goma. This is mainly for buildbots.') parser.add_argument('--show-warnings', metavar=str(_ALLOWED_WARNING_LEVEL), default='no', help='By default, most of third_party code is ' 'compiled with -w (ignore all wanings). This option ' 'removes the compiler flag.') parser.add_argument('--strip-runtime-binaries', action='store_true', help='Strip binaries in ARC. Files in ' 'out/target/<target>/lib will not be stripped. ' 'This is useful for remote debugging.') parser.add_argument('--system-packages', help='A comma-separated list of APK files that should ' 'be added as system apps.') parser.add_argument('--target', '-t', choices=ALLOWED_TARGETS, default=_DEFAULT_TARGET, type=_Options._parse_target, help='Target type to build') parser.add_argument('--verbose', '-v', action='store_true', help='Show verbose messages while configure runs.') parser.add_argument('--weird', action='store_true', help='Automatically sets configuration values used by ' 'the weird builder.') download_package_util_flags.add_extra_flags(parser) parsed_args = None # Note we override any options in the .configure file with options passed on # the command line. parsed_args = parser.parse_args(args, parsed_args) parsed_args = self._apply_args(parsed_args) self._values = vars(parsed_args) for name in parsed_args.logging: if name in _ALLOWED_LOGGING: self._loggers[name] = True else: print 'Unknown logging:', name parser.print_help() return -1 if parsed_args.show_warnings: if parsed_args.show_warnings in _ALLOWED_WARNING_LEVEL: self._show_warnings = parsed_args.show_warnings else: print 'Unknown warning level:', parsed_args.show_warnings parser.print_help() return -1 if parsed_args.system_packages: self._system_packages = parsed_args.system_packages.split(',') # ARM Chrome OS does not have a lot of storage and it takes a lot # of time to transfer binaries. Note that you still have debug # symbols in out/target/<target>/lib. if self.is_arm(): self._values['strip_runtime_binaries'] = True # NaCl i686 does not support ART AOT and support is not planned in the # future. if self.is_nacl_i686(): self._values['enable_art_aot'] = False error = self._check_args(parsed_args) if error: parser.print_help() print '\n', error return -1 self.parsed = True return 0
def parse(self, args): parser = argparse.ArgumentParser( usage=os.path.basename(sys.argv[0]) + ' <options>', epilog=_Options._help_epilog(), formatter_class=argparse.RawTextHelpFormatter) parser.add_argument('--cc-wrapper', metavar='[cc-wrapper]', help='Compiler wrapper used by goma') parser.add_argument('--chrometype', '-c', choices=_ALLOWED_CHROMETYPES, default=_DEFAULT_CHROMETYPE, type=_Options._parse_chrometype, help='Indicates Chrome type.') parser.add_argument( '--configure-jobs', '-j', default=None, type=int, metavar='jobs', help='Max number of parellel jobs run during ' 'configure. Defaults to number of CPUs. Set to 0 to ' 'force configure to run in a single process which can ' 'aid in diagnosing failures.') parser.add_argument('--disable-art-aot', action='store_false', dest='enable_art_aot', help='Disable ART boot image ' 'and AOT compilation.') parser.add_argument('--disable-config-cache', action='store_false', dest='enable_config_cache', help='Disable configuration cache.') parser.add_argument('--disable-debug-info', action='store_true', help='Do not generate debug information. ') parser.add_argument('--disable-debug-code', action='store_true', help='Skip debug logging / assertions.') parser.add_argument('--disable-goma', action='store_true', help='Do not use goma to build.') parser.add_argument('--disable-hwui', action='store_true', help='Disable the use of hardware accelerated ' 'rendering in the Android UI code.') parser.add_argument( '--disable-method-whitelist', action='store_false', dest='enable_method_whitelist', help='Disable method whitelist for boot.oat. ' 'This also changes the compiler filter to ' '"everything", which will require adjustments to the ' 'executable section address to be able to run.') parser.add_argument('--enable-aacenc', action='store_true', help='Build libraries to support AAC encoding.') parser.add_argument( '--enable-atrace', action='store_true', help='Enable Android trace events through Chromium') parser.add_argument('--enable-binder', action='store_true', help='Enable Binder calls for all services.') parser.add_argument( '--enable-jemalloc-debug', action='store_true', help='Enable jemalloc debug mode. This fills all ' 'memory returned from malloc() and all memory passed ' 'to free() with garbage.') parser.add_argument('--enable-touch-overlay', action='store_true', help='[EXPERIMENTAL] Overlay touch spots on the ' 'screen in the plugin after the app renders.') parser.add_argument('--enable-valgrind', action='store_true', help='Run unit tests under Valgrind.') parser.add_argument('--goma-dir', help='The directory for goma.') parser.add_argument( '--java-dir', default='/usr/lib/jvm/java-7-openjdk-amd64', help='The directory for Java. The path ' 'points to a directory, which usually JAVA_HOME env ' 'variable points to. E.g. ' '/usr/lib/jvm/java-7-openjdk-amd64 for Ubuntu.') parser.add_argument( '--logging', metavar=str(_ALLOWED_LOGGING), help='A comma-separated list of logging to enable on ' 'build.') parser.add_argument( '--notest', action='store_false', dest='run_tests', help='Disable automatic running of unit tests during ' 'build.') parser.add_argument( '--official-build', action='store_true', help='Set configure options for an official Runtime ' 'build.') parser.add_argument('--opt', '-O', action='store_true', help='Enable optimizations.') parser.add_argument( '--internal-apks-source', choices=_ALLOWED_INTERNAL_APKS_SOURCES, default=_DEFAULT_INTERNAL_APKS_SOURCES, help='Source of play-services and ' 'GoogleContactsSyncAdapter APKs. \'prebuilt\' is the ' 'default and it requires production server access.') parser.add_argument( '--regen-build-prop', action='store_true', help='Forces regeneration of the build.prop file ' 'which contains git HEAD information for release ' 'purposes. Pass this option to make sure the file is ' 'up to date. Note: requires rebuilding the rootfs.') parser.add_argument('--restart-goma', action='store_true', help='Restart goma. This is mainly for buildbots.') parser.add_argument( '--show-warnings', metavar=str(_ALLOWED_WARNING_LEVEL), default='no', help='By default, most of third_party code is ' 'compiled with -w (ignore all wanings). This option ' 'removes the compiler flag.') parser.add_argument('--strip-runtime-binaries', action='store_true', help='Strip binaries in ARC. Files in ' 'out/target/<target>/lib will not be stripped. ' 'This is useful for remote debugging.') parser.add_argument( '--system-packages', help='A comma-separated list of APK files that should ' 'be added as system apps.') parser.add_argument('--target', '-t', choices=ALLOWED_TARGETS, default=_DEFAULT_TARGET, type=_Options._parse_target, help='Target type to build') parser.add_argument('--verbose', '-v', action='store_true', help='Show verbose messages while configure runs.') parser.add_argument( '--weird', action='store_true', help='Automatically sets configuration values used by ' 'the weird builder.') download_package_util_flags.add_extra_flags(parser) parsed_args = None # Note we override any options in the .configure file with options passed on # the command line. parsed_args = parser.parse_args(args, parsed_args) parsed_args = self._apply_args(parsed_args) self._values = vars(parsed_args) for name in parsed_args.logging: if name in _ALLOWED_LOGGING: self._loggers[name] = True else: print 'Unknown logging:', name parser.print_help() return -1 if parsed_args.show_warnings: if parsed_args.show_warnings in _ALLOWED_WARNING_LEVEL: self._show_warnings = parsed_args.show_warnings else: print 'Unknown warning level:', parsed_args.show_warnings parser.print_help() return -1 if parsed_args.system_packages: self._system_packages = parsed_args.system_packages.split(',') # ARM Chrome OS does not have a lot of storage and it takes a lot # of time to transfer binaries. Note that you still have debug # symbols in out/target/<target>/lib. if self.is_arm(): self._values['strip_runtime_binaries'] = True # NaCl i686 does not support ART AOT and support is not planned in the # future. if self.is_nacl_i686(): self._values['enable_art_aot'] = False error = self._check_args(parsed_args) if error: parser.print_help() print '\n', error return -1 self.parsed = True return 0