diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-12-15 11:52:05 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-12-16 14:42:30 +0200 |
commit | 0bbc9df74a69c98f52a51c530f658746d0ea95c4 (patch) | |
tree | 1a0cc9430e7ae77dac700afeeb163459ec18345e | |
parent | 83fb76c9ae1bbfce2b2ad67bc6ba2b5ec2263fe2 (diff) | |
download | meson-0bbc9df74a69c98f52a51c530f658746d0ea95c4.zip meson-0bbc9df74a69c98f52a51c530f658746d0ea95c4.tar.gz meson-0bbc9df74a69c98f52a51c530f658746d0ea95c4.tar.bz2 |
dependencies: Also strip git version from llvm version
If LLVM is built from a git mirror instead of from SVN it will have
"git-<very short sha>" at the end of the version. We need to remove that
so that version comparison will work correctly.
Fixes: #2786
-rw-r--r-- | mesonbuild/dependencies/dev.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 6bab173..91414d5 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -150,7 +150,12 @@ class LLVMDependency(ConfigToolDependency): # Currently meson doesn't really attempt to handle pre-release versions, # so strip the 'svn' off the end, since it will probably cuase problems # for users who want the patch version. + # + # If LLVM is built from svn then "svn" will be appended to the version + # string, if it's built from a git mirror then "git-<very short sha>" + # will be appended instead. self.version = self.version.rstrip('svn') + self.version = self.version.split('git')[0] self.provided_modules = self.get_config_value(['--components'], 'modules') modules = stringlistify(extract_as_list(kwargs, 'modules')) |