i965: Disable fast clears when running with INTEL_DEBUG=nofc
[mesa.git] / meson.build
index aea5c2e4444c871a99f605a63a0f423d4d742bc3..20c40f1d22178f965928564c7a2b12712690765b 100644 (file)
@@ -761,8 +761,8 @@ if with_platform_x11
     endif
   endif
 else
-  pre_args += '-DMESA_EGL_NO_X11_HEADERS'
-  gl_pkgconfig_c_flags += '-DMESA_EGL_NO_X11_HEADERS'
+  pre_args += '-DEGL_NO_X11'
+  gl_pkgconfig_c_flags += '-DEGL_NO_X11'
 endif
 if with_platform_drm
   if with_egl and not with_gbm
@@ -1052,9 +1052,14 @@ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() ==
 endif
 
 # Check for standard headers and functions
-if cc.has_header_symbol('sys/sysmacros.h', 'major')
+if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
+  cc.has_header_symbol('sys/sysmacros.h', 'minor') and
+  cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
   pre_args += '-DMAJOR_IN_SYSMACROS'
-elif cc.has_header_symbol('sys/mkdev.h', 'major')
+endif
+if (cc.has_header_symbol('sys/mkdev.h', 'major') and
+  cc.has_header_symbol('sys/mkdev.h', 'minor') and
+  cc.has_header_symbol('sys/mkdev.h', 'makedev'))
   pre_args += '-DMAJOR_IN_MKDEV'
 endif
 
@@ -1123,10 +1128,8 @@ if cc.links('int main() { return 0; }',
             name : 'dynamic-list')
   with_ld_dynamic_list = true
 endif
-ld_args_build_id = []
-if build_machine.system() != 'darwin'
-   ld_args_build_id += '-Wl,--build-id=sha1'
-endif
+
+ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
 
 # check for dl support
 dep_dl = null_dep
@@ -1251,7 +1254,7 @@ if dep_libdrm.found()
 endif
 
 llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit']
-llvm_optional_modules = []
+llvm_optional_modules = ['coroutines']
 if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
   llvm_modules += ['amdgpu', 'native', 'bitreader', 'ipo']
   if with_gallium_r600
@@ -1264,9 +1267,6 @@ if with_gallium_opencl
     'lto', 'option', 'objcarcopts', 'profiledata',
   ]
 endif
-if with_gallium_opencl or with_gallium_softpipe
-  llvm_optional_modules += ['coroutines']
-endif
 
 if with_amd_vk or with_gallium_radeonsi
   _llvm_version = '>= 8.0.0'
@@ -1445,6 +1445,9 @@ if with_platform_x11
         with_gallium_omx != 'disabled'))
     dep_xcb = dependency('xcb')
     dep_x11_xcb = dependency('x11-xcb')
+    if with_dri_platform == 'drm' and not dep_libdrm.found()
+      error('libdrm required for gallium video statetrackers when using x11')
+    endif
   endif
   if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
     dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')