tests: don't try to build llvm test if dep is unfound

dragonfly BSD doesn't ship dynamic modules for LLVM so static linking is
required.
pull/2803/head
Dylan Baker 7 years ago
parent ddb244f2ba
commit 19a274c051
  1. 24
      test cases/frameworks/15 llvm/meson.build

@ -20,17 +20,19 @@ foreach static : [true, false]
'llvm', 'llvm',
modules : ['bitwriter', 'asmprinter', 'executionengine', 'target', modules : ['bitwriter', 'asmprinter', 'executionengine', 'target',
'mcjit', 'nativecodegen'], 'mcjit', 'nativecodegen'],
required : true, required : false,
static : static, static : static,
) )
name = static ? 'static' : 'dynamic' if llvm_dep.found()
executable( name = static ? 'static' : 'dynamic'
'sum-@0@'.format(name), executable(
'sum.c', 'sum-@0@'.format(name),
dependencies : [ 'sum.c',
llvm_dep, dep_tinfo, dependencies : [
dependency('zlib'), llvm_dep, dep_tinfo,
meson.get_compiler('c').find_library('dl', required : false), dependency('zlib'),
] meson.get_compiler('c').find_library('dl', required : false),
) ]
)
endif
endforeach endforeach

Loading…
Cancel
Save