diff options
author | Dan Albert <danalbert@google.com> | 2018-10-25 13:36:51 -0700 |
---|---|---|
committer | Dan Albert <danalbert@google.com> | 2018-10-25 14:46:28 -0700 |
commit | dae41c79f8a14808071870bba73201f1d90ccfed (patch) | |
tree | 83ba0cbc06557d1bc950182a93c81982b4b2e66a /build/tools | |
parent | 14f83f0357bce4e2cc178f3a93c769ae1e8032c0 (diff) | |
download | ndk-dae41c79f8a14808071870bba73201f1d90ccfed.tar.gz |
Put the new toolchain back in to toolchains/llvm.
Moving this to an entirely separate directory will likely be too
disruptive. While not very difficult to fix in any given build system,
there's a significant number of third-party projects that do not even
use standalone toolchains. Those few of them using Clang can be kept
working for the time being (they'll still break when we remove
$NDK/sysroot if they're using `--sysroot` like they should be rather
than `-isystem`).
This also saves us a small amount of space in the transition period.
Although we still need to duplicate binutils, libc++, the sysroot,
etc, we can at least dedup Clang.
Test: ./checkbuild.py && ./run_tests.py
Bug: https://github.com/android-ndk/ndk/issues/780
Change-Id: I5760e55240fc3ff0ed2fe5385b8dca9394327dd1
Diffstat (limited to 'build/tools')
-rwxr-xr-x | build/tools/make_standalone_toolchain.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/build/tools/make_standalone_toolchain.py b/build/tools/make_standalone_toolchain.py index 72148a805..e3052994b 100755 --- a/build/tools/make_standalone_toolchain.py +++ b/build/tools/make_standalone_toolchain.py @@ -47,7 +47,7 @@ def check_ndk_or_die(): checks = [ 'build/core', 'prebuilt', - 'toolchain', + 'toolchains', ] for check in checks: @@ -80,9 +80,10 @@ def get_host_tag_or_die(): sys.exit('Unsupported platform: ' + platform.system()) -def get_toolchain_path_or_die(): +def get_toolchain_path_or_die(host_tag): """Return the toolchain path or die.""" - toolchain_path = os.path.join(NDK_DIR, 'toolchain') + toolchain_path = os.path.join(NDK_DIR, 'toolchains/llvm/prebuilt', + host_tag) if not os.path.exists(toolchain_path): sys.exit('Could not find toolchain: {}'.format(toolchain_path)) return toolchain_path @@ -233,7 +234,7 @@ def create_toolchain(install_path, arch, api, toolchain_path, host_tag): def warn_unnecessary(is_windows): if is_windows: ndk_var = '%NDK%' - prompt = 'C:\>' + prompt = 'C:\\>' else: ndk_var = '$NDK' prompt = '$ ' @@ -333,7 +334,7 @@ def main(): api, args.arch, min_api)) triple = get_triple(args.arch) - toolchain_path = get_toolchain_path_or_die() + toolchain_path = get_toolchain_path_or_die(host_tag) if args.install_dir is not None: install_path = args.install_dir |