diff options
author | Josh Gao <jmgao@google.com> | 2015-09-02 10:47:33 -0700 |
---|---|---|
committer | Josh Gao <jmgao@google.com> | 2015-09-02 10:47:33 -0700 |
commit | 11cc63e016de2288a6fb3ac7aed4467e02deeab8 (patch) | |
tree | 75e529abc180d7b4eaf59f2eb40571f42a1c53c5 /build/lib | |
parent | 0a7809ac690dfcba7c0ec5dddf5c11b5bcafccfd (diff) | |
download | ndk-11cc63e016de2288a6fb3ac7aed4467e02deeab8.tar.gz |
Add helper to convert host to tag for build scripts.
Change-Id: I22571e487bfddd33fda61f9a015abf9fd97c3ffa
Diffstat (limited to 'build/lib')
-rw-r--r-- | build/lib/build_support.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/build/lib/build_support.py b/build/lib/build_support.py index e57518742..feac13488 100644 --- a/build/lib/build_support.py +++ b/build/lib/build_support.py @@ -116,6 +116,15 @@ def get_default_host(): else: raise RuntimeError('Unsupported host: {}'.format(sys.platform)) +def host_to_tag(host): + if host in ['darwin', 'linux']: + return host + '-x86_64' + elif host == 'windows': + return 'windows-x86' + elif host == 'windows64': + return 'windows-x86_64' + else: + raise RuntimeError('Unsupported host: {}'.format(host)) class ArgParser(argparse.ArgumentParser): def __init__(self): |