diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-10-22 07:21:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-22 17:21:14 +0300 |
commit | e8399c8c6e237f82c194e0a917767c0dc5e92062 (patch) | |
tree | f3b50b4dbe0ab5d016ad666b731594eab1183b19 /mesonbuild/dependencies/dev.py | |
parent | e7009d439c8e4e3d5497a6911b63fa6c47bde6b8 (diff) | |
download | meson-e8399c8c6e237f82c194e0a917767c0dc5e92062.zip meson-e8399c8c6e237f82c194e0a917767c0dc5e92062.tar.gz meson-e8399c8c6e237f82c194e0a917767c0dc5e92062.tar.bz2 |
depenencies/llvm: Handle llvm-config --shared-mode failing (#7379)
* depenencies/llvm: Handle llvm-config --shared-mode failing
Fixes: #7371
Fixes: #7878
* test cases/llvm: Refactor to use test.json
Instead of trying to cover everything internally
Diffstat (limited to 'mesonbuild/dependencies/dev.py')
-rw-r--r-- | mesonbuild/dependencies/dev.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/dependencies/dev.py b/mesonbuild/dependencies/dev.py index 99c5c07..c35022d 100644 --- a/mesonbuild/dependencies/dev.py +++ b/mesonbuild/dependencies/dev.py @@ -281,7 +281,13 @@ class LLVMDependencyConfigTool(ConfigToolDependency): def _set_new_link_args(self, environment): """How to set linker args for LLVM versions >= 3.9""" - mode = self.get_config_value(['--shared-mode'], 'link_args')[0] + try: + mode = self.get_config_value(['--shared-mode'], 'link_args')[0] + except IndexError: + mlog.debug('llvm-config --shared-mode returned an error') + self.is_found = False + return + if not self.static and mode == 'static': # If llvm is configured with LLVM_BUILD_LLVM_DYLIB but not with # LLVM_LINK_LLVM_DYLIB and not LLVM_BUILD_SHARED_LIBS (which |