mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1357889
- forbid LLVM >= 4.0 for being used for stylo bindgen; r=rillian
Released versions of LLVM 4.0 do not work properly with bindgen, and the in-development 5.0 version doesn't either. To avoid undue hair-pulling, we should detect such versions early during configure and advise the user about appropriate versions.
This commit is contained in:
parent
b0f2aeaa56
commit
0ece476d59
@ -594,9 +594,9 @@ option('--disable-stylo-build-bindgen',
|
||||
help='Enable build-time bindgen for Stylo')
|
||||
|
||||
option('--with-libclang-path', nargs=1,
|
||||
help='Absolute path to Clang/LLVM libraries for Stylo (at least version 3.9.0')
|
||||
help='Absolute path to Clang/LLVM libraries for Stylo (version 3.9.x')
|
||||
option('--with-clang-path', nargs=1,
|
||||
help='Absolute path to a Clang binary for Stylo bindgen (at least version 3.9.0)')
|
||||
help='Absolute path to a Clang binary for Stylo bindgen (version 3.9.x)')
|
||||
|
||||
def invoke_llvm_config(llvm_config, *options):
|
||||
'''Invoke llvm_config with the given options and return the first line of
|
||||
@ -608,11 +608,13 @@ def invoke_llvm_config(llvm_config, *options):
|
||||
def check_minimum_llvm_config_version(llvm_config):
|
||||
version = Version(invoke_llvm_config(llvm_config, '--version'))
|
||||
min_version = Version('3.9.0')
|
||||
if version < min_version:
|
||||
# For various reasons, bindgen only works with LLVM 3.9.x for right now.
|
||||
non_working_version = Version('4.0.0')
|
||||
if version < min_version or version >= non_working_version:
|
||||
die(dedent('''\
|
||||
llvm installation {} is too old.
|
||||
llvm installation {} is incompatible with Stylo bindgen.
|
||||
|
||||
To compile Stylo, please install at least version {} of
|
||||
To compile Stylo, please install version {} of
|
||||
Clang + LLVM and ensure that the 'llvm-config' from that
|
||||
installation is first on your path.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user