summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2023-04-21 13:44:04 +0530
committerEli Schwartz <eschwartz93@gmail.com>2023-04-24 11:42:40 -0400
commit9cc5009a44bda2af92cc10978ad7adf15b1c9fd3 (patch)
tree0458b9e3a723e09bc13937a603a0e8d0b6ca6a3a
parent09ec4f6e225fb1634a800a58c28a87fe3733b343 (diff)
downloadmeson-9cc5009a44bda2af92cc10978ad7adf15b1c9fd3.tar.gz
ci: Don't search for llvm modules with LLVM 16.0.x
See: https://github.com/mesonbuild/meson/issues/11642
-rw-r--r--test cases/frameworks/15 llvm/meson.build56
1 files changed, 40 insertions, 16 deletions
diff --git a/test cases/frameworks/15 llvm/meson.build b/test cases/frameworks/15 llvm/meson.build
index c8485fb68..411d6db29 100644
--- a/test cases/frameworks/15 llvm/meson.build
+++ b/test cases/frameworks/15 llvm/meson.build
@@ -16,14 +16,27 @@ if(method == 'combination')
static : static,
method : 'config-tool',
)
- llvm_cm_dep = dependency(
- 'llvm',
- modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
- 'mcjit', 'nativecodegen', 'amdgpu', 'engine'],
- required : false,
- static : static,
- method : 'cmake',
- )
+
+ # Bump the version along till the LLVM bug is fixed
+ if static and d.version().startswith('16.0') and d.version()[5].to_int() <= 2
+ message('Skipping modules with cmake, see https://github.com/mesonbuild/meson/issues/11642')
+ llvm_cm_dep = dependency(
+ 'llvm',
+ required : false,
+ static : static,
+ method : 'cmake',
+ )
+ else
+ llvm_cm_dep = dependency(
+ 'llvm',
+ modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
+ 'mcjit', 'nativecodegen', 'amdgpu', 'engine'],
+ required : false,
+ static : static,
+ method : 'cmake',
+ )
+ endif
+
assert(llvm_ct_dep.found() == llvm_cm_dep.found(), 'config-tool and cmake results differ')
cm_version_major = llvm_cm_dep.version().split('.')[0].to_int()
cm_version_minor = llvm_cm_dep.version().split('.')[1].to_int()
@@ -67,14 +80,25 @@ else
dep_tinfo = cpp.find_library('tinfo', required: false)
endif
- llvm_dep = dependency(
- 'llvm',
- modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
- 'mcjit', 'nativecodegen', 'amdgpu'],
- required : false,
- static : static,
- method : method,
- )
+ # Bump the version along till the LLVM bug is fixed
+ if static and method == 'cmake' and d.version().startswith('16.0') and d.version()[5].to_int() <= 2
+ message('Skipping modules with cmake, see https://github.com/mesonbuild/meson/issues/11642')
+ llvm_dep = dependency(
+ 'llvm',
+ required : false,
+ static : static,
+ method : method,
+ )
+ else
+ llvm_dep = dependency(
+ 'llvm',
+ modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
+ 'mcjit', 'nativecodegen', 'amdgpu'],
+ required : false,
+ static : static,
+ method : method,
+ )
+ endif
if not llvm_dep.found()
error('MESON_SKIP_TEST required llvm modules not found.')