From ca02ee43393c35b0cca2e8d7ced640ea1d224807 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Thu, 21 Dec 2017 18:52:16 -0800 Subject: [PATCH] [waf] Support --bundled-clang=5.0.1 --- wscript | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/wscript b/wscript index e74d643b..63674383 100644 --- a/wscript +++ b/wscript @@ -34,7 +34,7 @@ elif sys.platform.startswith('freebsd'): # It is either 'linux2' or 'linux3' before Python 3.3 elif sys.platform.startswith('linux'): # These executable depend on libtinfo.so.5 - CLANG_TARBALL_NAME = 'clang+llvm-$version-linux-x86_64-ubuntu14.04' + CLANG_TARBALL_NAME = 'clang+llvm-$version-x86_64-linux-gnu-ubuntu-14.04' elif sys.platform == 'win32': CLANG_TARBALL_NAME = 'LLVM-$version-win64' CLANG_TARBALL_EXT = '.exe' @@ -79,7 +79,7 @@ def options(opt): grp.add_option('--use-system-clang', dest='use_system_clang', default=False, action='store_true', help='enable use of clang from the system') grp.add_option('--bundled-clang', dest='bundled_clang', default='4.0.0', - help='bundled clang version, downloaded from https://releases.llvm.org/ , e.g. 4.0.0 5.0.0') + help='bundled clang version, downloaded from https://releases.llvm.org/ , e.g. 4.0.0 5.0.1') grp.add_option('--llvm-config', dest='llvm_config', default='llvm-config', help='specify path to llvm-config for automatic configuration [default: %default]') grp.add_option('--clang-prefix', dest='clang_prefix', default='', @@ -173,22 +173,9 @@ def configure(ctx): else: global CLANG_TARBALL_NAME, CLANG_TARBALL_EXT - # TODO Remove these after dropping clang 4 (after we figure out how to index Chrome) - if ctx.options.bundled_clang[0] == '4': - CLANG_TARBALL_EXT = '.tar.xz' - if sys.platform == 'darwin': - CLANG_TARBALL_NAME = 'clang+llvm-$version-x86_64-apple-darwin' - elif sys.platform.startswith('freebsd'): - CLANG_TARBALL_NAME = 'clang+llvm-$version-amd64-unknown-freebsd10' - elif sys.platform.startswith('linux'): - # These executable depend on libtinfo.so.5 - CLANG_TARBALL_NAME = 'clang+llvm-$version-x86_64-linux-gnu-ubuntu-14.04' - elif sys.platform == 'win32': - CLANG_TARBALL_NAME = 'LLVM-$version-win64' - CLANG_TARBALL_EXT = '.exe' - else: - sys.stderr.write('ERROR: releases.llvm.org does not provide pre-built binaries for your platform {0}\n'.format(sys.platform)) - sys.exit(1) + # TODO Remove after 5.0.1 is stable + if ctx.options.bundled_clang == '5.0.0' and sys.platform.startswith('linux'): + CLANG_TARBALL_NAME = 'clang+llvm-$version-linux-x86_64-ubuntu14.04' CLANG_TARBALL_NAME = string.Template(CLANG_TARBALL_NAME).substitute(version=ctx.options.bundled_clang) # Directory clang has been extracted to.