diff options
author | Dan Albert <danalbert@google.com> | 2015-11-04 10:26:18 -0800 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2015-11-04 16:57:12 -0800 |
commit | 7fb6fe2f12fc3a654f1eb2475758e2bd1796bf35 (patch) | |
tree | 560f9402a5d0d79516661a95f4d545565030cf64 /checkbuild.py | |
parent | 3111269adf78e764ba5b4c7a904b93430a44dbec (diff) | |
download | ndk-7fb6fe2f12fc3a654f1eb2475758e2bd1796bf35.tar.gz |
Build final host-tools package.
This is the conglomeration of all the common host tools. The way
things are organized right now, these are essentially all required.
Some of these things can be broken out. Android Studio users don't
need GDB, Make, or Awk.
Change-Id: I35f7a3bdb7eab4b9069f99b30a522062ada55342
Diffstat (limited to 'checkbuild.py')
-rw-r--r-- | checkbuild.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/checkbuild.py b/checkbuild.py index e7dbf828c..37dcfb31e 100644 --- a/checkbuild.py +++ b/checkbuild.py @@ -382,6 +382,37 @@ def build_host_tools(out_dir, args): print('Building YASM...') invoke_external_build('toolchain/yasm/build.py', build_args) + package_host_tools(out_dir, args.system) + + +def package_host_tools(out_dir, host): + packages = [ + 'gdb-multiarch-7.10', + 'ndk-awk', + 'ndk-depends', + 'ndk-make', + 'ndk-python', + 'ndk-stack', + 'ndk-yasm', + ] + + if host in ('windows', 'windows64'): + packages.append('toolbox') + + host_tag = build_support.host_to_tag(host) + + package_names = [p + '-' + host_tag + '.tar.bz2' for p in packages] + temp_dir = tempfile.mkdtemp() + try: + for package_name in package_names: + package_path = os.path.join(out_dir, package_name) + subprocess.check_call(['tar', 'xf', package_path, '-C', temp_dir]) + package_name = 'host-tools-' + host_tag + build_support.make_package(package_name, ['prebuilt'], out_dir, + temp_dir, repo_prop_dir='prebuilt') + finally: + shutil.rmtree(temp_dir) + def build_gdbserver(out_dir, args): print('Building gdbserver...') |