mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-22 07:35:08 +00:00
[waf] Support --bundled-clang=5.0.1
This commit is contained in:
parent
ba1ca37326
commit
ca02ee4339
23
wscript
23
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.
|
||||
|
Loading…
Reference in New Issue
Block a user