pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
endif
endif
-if with_amd_vk or with_gallium_radeonsi or with_gallium_r600 or with_gallium_opencl
- dep_elf = dependency('libelf', required : false)
- if not dep_elf.found()
- dep_elf = cc.find_library('elf')
- endif
-else
- dep_elf = null_dep
-endif
dep_expat = dependency('expat')
# this only exists on linux so either this is linux and it will be found, or
# its not linux and and wont
error('The following drivers require LLVM: Radv, RadeonSI, SWR. One of these is enabled, but LLVM is disabled.')
endif
+if (with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or
+ (with_gallium_r600 and with_llvm))
+ dep_elf = dependency('libelf', required : false)
+ if not dep_elf.found()
+ dep_elf = cc.find_library('elf')
+ endif
+else
+ dep_elf = null_dep
+endif
+
dep_glvnd = null_dep
if with_glvnd
dep_glvnd = dependency('libglvnd', version : '>= 0.2.0')