diff options
author | Dan Albert <danalbert@google.com> | 2015-11-09 15:39:20 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-11-11 10:32:51 -0800 |
commit | 8120ea73d4becb4e5298b3033462f045e32f12a6 (patch) | |
tree | caa50cb13124b1d6c0e750e2466c225c2fcc4b6b /checkbuild.py | |
parent | 8cacf200d6dea9e8f83e4922a116f31e831793fb (diff) | |
download | ndk-8120ea73d4becb4e5298b3033462f045e32f12a6.tar.gz |
Build a GCC module from prebuilts/ndk.
Previously the module was built only when building GCC (with --module
gcc or build.py in toolchain/gcc), but doing that is a waste of time.
This changes the meaning of the GCC module from "build GCC from
source" to "package the prebuilt GCC for the NDK".
Change-Id: I8309d758cb1ae5b1ea816348c3f5c1d4a67aa281
Diffstat (limited to 'checkbuild.py')
-rw-r--r-- | checkbuild.py | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/checkbuild.py b/checkbuild.py index 37dcfb31e..219be0ce2 100644 --- a/checkbuild.py +++ b/checkbuild.py @@ -101,14 +101,6 @@ class ArgParser(argparse.ArgumentParser): '--host-only', action='store_true', help='Skip building target components.') - gcc_group = module_group.add_mutually_exclusive_group() - gcc_group.add_argument( - '--skip-gcc', action='store_true', default=True, - help='Skip building and packaging GCC (default).') - gcc_group.add_argument( - '--no-skip-gcc', action='store_false', dest='skip_gcc', - help='Build and package GCC.') - def _invoke_build(script, args): if args is None: @@ -279,12 +271,11 @@ def build_clang(out_dir, args): def build_gcc(out_dir, args): - gcc_build_args = common_build_args(out_dir, args) - if args.arch is not None: - toolchain_name = build_support.arch_to_toolchain(args.arch) - gcc_build_args.append('--toolchain={}'.format(toolchain_name)) print('Building GCC...') - invoke_external_build('toolchain/gcc/build.py', gcc_build_args) + build_args = common_build_args(out_dir, args) + if args.arch is not None: + build_args.append('--arch={}'.format(args.arch)) + invoke_build('build-gcc.py', build_args) def build_gcc_libs(out_dir, args): @@ -523,19 +514,17 @@ def main(): os.makedirs(out_dir) if args.module is None: - modules = ALL_MODULES - {'gcc'} + modules = ALL_MODULES else: modules = {args.module} if args.host_only: modules = { 'clang', + 'gcc', 'host-tools', } - if not args.skip_gcc: - modules |= {'gcc'} - if args.arch is not None: package_args.append('--arch={}'.format(args.arch)) @@ -563,7 +552,7 @@ def main(): for module in modules: module_builds[module](out_dir, args) - required_package_modules = ALL_MODULES - {'gcc'} + required_package_modules = ALL_MODULES if args.package and required_package_modules <= modules: package_ndk(args.release, system, out_dir, package_args) |