Lines Matching +full:enable +full:- +full:glcpp +full:- +full:tests
1 # Copyright © 2017-2020 Intel Corporation
2 # SPDX-License-Identifier: MIT
12 'b_ndebug=if-release',
22 add_project_arguments('-fobjc-arc', language : 'objc')
45 with_mesa_ndebug = get_option('b_ndebug') == 'true' or (get_option('buildtype') == 'release' and get_option('b_ndebug') == 'if-release')
51 '-D__STDC_CONSTANT_MACROS',
52 '-D__STDC_FORMAT_MACROS',
53 '-D__STDC_LIMIT_MACROS',
54 '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
55 '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"',
63 with_moltenvk_dir = get_option('moltenvk-dir')
64 with_vulkan_icd_dir = get_option('vulkan-icd-dir')
65 with_tests = get_option('build-tests')
66 with_glcpp_tests = get_option('enable-glcpp-tests')
67 with_aco_tests = get_option('build-aco-tests')
68 with_glx_read_only_text = get_option('glx-read-only-text')
69 with_glx_direct = get_option('glx-direct')
71 with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay')
72 with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select')
73 with_vulkan_screenshot_layer = get_option('vulkan-layers').contains('screenshot')
74 with_vulkan_vram_report_limit_layer = get_option('vulkan-layers').contains('vram-report-limit')
78 'drm-shim',
79 'dlclose-skip',
84 'intel-ui',
93 with_any_vulkan_layers = get_option('vulkan-layers').length() != 0
94 with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
97 dri_drivers_path = get_option('dri-drivers-path')
102 gbm_backends_path = get_option('gbm-backends-path')
108 with_shared_glapi = get_option('shared-glapi') \
115 .require(with_shared_glapi, error_message : 'OpengGL ES 1.x requires shared-glapi') \
119 .require(with_shared_glapi, error_message : 'OpengGL ES 2.x requires shared-glapi') \
122 pre_args += '-DHAVE_OPENGL=@0@'.format(with_opengl.to_int())
123 pre_args += '-DHAVE_OPENGL_ES_1=@0@'.format(with_gles1.to_int())
124 pre_args += '-DHAVE_OPENGL_ES_2=@0@'.format(with_gles2.to_int())
132 gallium_drivers = get_option('gallium-drivers')
156 error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
164 error('Unknown OS @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
168 # Build-test everything except for i915, which depends on libdrm-intel which
169 # is not available on non-Intel distros.
180 warning('`gallium-drivers=swrast` is a deprecated alias for `gallium-drivers=softpipe,llvmpipe` and will be removed in version 25.0')
183 with_amdgpu_virtio = get_option('amdgpu-virtio')
207 pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
210 # compatibility for "swrast" as an internal-ish driver name
213 pre_args += '-DHAVE_SWRAST'
227 _vulkan_drivers = get_option('vulkan-drivers')
239 error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
246 error('Unknown OS @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
253 'imagination-experimental', 'microsoft-experimental',
265 with_imagination_vk = _vulkan_drivers.contains('imagination-experimental')
266 with_imagination_srv = get_option('imagination-srv')
267 with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
280 freedreno_kmds = get_option('freedreno-kmds')
285 warning('As a side-effect, Turnip is forced to link with libdrm when built alongside Gallium DRM drivers which platforms such as Android may not have available at runtime.')
310 with_intel_vk_rt = get_option('intel-rt') \
312 .disable_if(get_option('intel-bvh-grl') and \
317 with_intel_bvh_grl = get_option('intel-bvh-grl')
319 if get_option('intel-clc') != 'system' and \
320 get_option('precomp-compiler') != 'system' and \
322 # Require intel-clc with Anv & Iris (for internal shaders)
323 with_intel_clc = get_option('intel-clc') == 'enabled' or \
324 get_option('precomp-compiler') == 'enabled' or \
343 pre_args += '-DHAVE_NVK'
350 error('ACO tests require Radv')
353 with_microsoft_clc = get_option('microsoft-clc').enabled()
354 with_spirv_to_dxil = get_option('spirv-to-dxil')
358 pre_args += '-DBUILDING_MESA'
370 with_vulkan_beta = get_option('vulkan-beta')
376 pre_args += '-DVK_ENABLE_BETA_EXTENSIONS'
379 _codecs = get_option('video-codecs')
396 pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
412 error('Unknown OS @0@. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.'.format(
427 pre_args += '-DVK_USE_PLATFORM_OHOS=1'
479 with_xlib_lease = get_option('xlib-lease') \
480 .require(with_platform_x11 and (system_has_kms_drm or with_dri_platform == 'apple'), error_message : 'xlib-lease requires X11 and KMS/DRM support') \
485 .require(with_shared_glapi, error_message : 'EGL requires shared-glapi') \
496 egl_native_platform = get_option('egl-native-platform')
503 error('-Degl-native-platform does not specify an enabled platform')
511 pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
514 if with_platform_android and get_option('platform-sdk-version') >= 29
518 c_cpp_args += '-fno-emulated-tls'
519 add_project_link_arguments('-Wl,-plugin-opt=-emulated-tls=0', language: ['c', 'cpp'])
522 # -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
526 if c_arg.startswith('-mtls-dialect=')
533 # cross-compiling, but because this is just an optimization we can skip it
535 warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
537 warning('cannot use -mtls-dialect for FreeBSD, using compiler default')
539 # The way to specify the TLSDESC dialect is architecture-specific.
542 foreach tlsdesc_arg : ['-mtls-dialect=gnu2', '-mtls-dialect=desc']
543 # -fpic to force dynamic tls, otherwise TLS relaxation defeats check
545 args: [tlsdesc_arg, '-fpic'],
548 # check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
550 # get_linker_id misses LDFLAGS=-fuse-ld=lld: https://github.com/mesonbuild/meson/issues/6377
577 error('dri based GLX requires shared-glapi')
589 .require(get_option('egl-lib-suffix') == '',
593 pre_args += '-DUSE_LIBGLVND=@0@'.format(with_glvnd.to_int())
594 glvnd_vendor_name = get_option('glvnd-vendor-name')
602 with_x11_dri2 = with_dri2 and get_option('legacy-x11').contains('dri2')
612 dep_dxheaders = dependency('directx-headers', required : false)
614 dep_dxheaders = dependency('DirectX-Headers',
616 fallback : ['DirectX-Headers', 'dep_dxheaders'],
622 _with_gallium_d3d12_video = get_option('gallium-d3d12-video')
626 pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO'
637 vdpau = get_option('gallium-vdpau') \
638 .require(system_has_kms_drm, error_message : 'VDPAU state tracker can only be build on unix-like OSes.') \
640 .require(_vdpau_drivers.contains(true), error_message : 'VDPAU state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).')
645 pre_args += '-DHAVE_ST_VDPAU'
649 vdpau_drivers_path = get_option('vdpau-libs-path')
669 if run_command(prog_glslang, ['--version'], check : false).stdout().split(':')[2].version_compare(_glslang_check)
670 glslang_depfile = ['--depfile', '@DEPFILE@']
674 if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
675 glslang_quiet = ['--quiet']
689 _va = get_option('gallium-va') \
691 error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
692 _dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva'
698 pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
703 va_drivers_path = get_option('va-libs-path')
708 with_gallium_xa = get_option('gallium-xa') \
709 .require(system_has_kms_drm, error_message : 'XA state tracker can only be built on unix-like OSes.') \
714 d3d_drivers_path = get_option('d3d-drivers-path')
719 with_gallium_st_nine = get_option('gallium-nine')
736 error('The nine state tracker requires at least one non-swrast gallium driver.')
739 with_gallium_st_d3d10umd = get_option('gallium-d3d10umd')
759 args : '-mpower8-vector',
761 pre_args += ['-D_ARCH_PWR8']
762 c_cpp_args += '-mpower8-vector'
769 if get_option('vmware-mks-stats')
771 error('vmware-mks-stats requires gallium VMware/svga driver.')
773 pre_args += '-DVMX86_STATS=1'
776 _opencl = get_option('gallium-opencl')
793 with_gallium_rusticl = get_option('gallium-rusticl')
825 'You can install the latest version for your user with `cargo install bindgen-cli`.')
831 'you can install the latest version for your user with `cargo install bindgen-cli`.')
835 if get_option('precomp-compiler') != 'system'
836 with_drivers_clc = get_option('precomp-compiler') == 'enabled'
841 if get_option('mesa-clc') == 'system'
844 # Even with mesa-clc already built, rusticl still needs clc.
847 with_clc = get_option('mesa-clc') != 'auto' or \
863 pre_args += '-DUSE_XSHM'
866 pre_args += '-DGLX_INDIRECT_RENDERING'
868 pre_args += '-DGLX_DIRECT_RENDERING'
871 pre_args += '-DGLX_USE_DRM'
873 pre_args += '-DGLX_USE_APPLEGL'
878 pre_args += '-DGLX_USE_APPLE'
881 pre_args += '-DGLX_USE_WINDOWSGL'
891 pre_args += '-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=@0@'.format(with_glapi_export_proto_entry_points.to_int())
893 with_android_stub = get_option('android-stub')
895 error('`-D android-stub=true` makes no sense without `-D platforms=android`')
898 with_libbacktrace = get_option('android-libbacktrace') \
899 .require(with_platform_android, error_message : '`-D android-libbacktrace=enabled` makes no sense without `-D platforms=android`') \
904 cpp_args += '-DWITH_LIBBACKTRACE'
920 if get_option('platform-sdk-version') >= 26
923 if get_option('platform-sdk-version') >= 30
926 if get_option('platform-sdk-version') >= 35
930 pre_args += '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string()
931 if get_option('android-strict')
932 pre_args += '-DANDROID_STRICT'
940 if get_option('allow-kcmp') \
943 pre_args += '-DALLOW_KCMP'
950 prog_python, '-c',
964 prog_python, '-c',
978 pre_args += '-DETIME=ETIMEDOUT'
983 pre_args += '-DMESA_DEBUG=@0@'.format(with_mesa_debug.to_int())
985 with_split_debug = get_option('split-debug') \
986 .disable_if(not cc.has_argument('-gsplit-dwarf'),
987 error_message : 'split-debug requires compiler -gsplit-dwarf support') \
988 .disable_if(not cc.has_link_argument('-Wl,--gdb-index'),
989 error_message : 'split-debug requires the linker argument -Wl,--gdb-index')
992 add_project_arguments('-gsplit-dwarf', language : ['c', 'cpp'])
993 add_project_link_arguments('-Wl,--gdb-index', language : ['c', 'cpp'])
996 with_shader_cache = get_option('shader-cache') \
1001 pre_args += '-DENABLE_SHADER_CACHE'
1002 if not get_option('shader-cache-default')
1003 pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
1006 shader_cache_max_size = get_option('shader-cache-max-size')
1008 pre_args += '-DMESA_SHADER_CACHE_MAX_SIZE="@0@"'.format(shader_cache_max_size)
1016 pre_args += '-DHAVE___BUILTIN_@0@'.format(b.to_upper())
1027 pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
1030 pre_args += '-DHAVE_FUNC_ATTRIBUTE_VISIBILITY'
1034 pre_args += '-DHAVE_UINT128'
1038 pre_args += '-DHAVE_REALLOCARRAY'
1041 pre_args += '-DHAVE_FMEMOPEN'
1046 pre_args += '-D_GNU_SOURCE'
1048 pre_args += '-D__EXTENSIONS__'
1051 '-D_WINDOWS', '-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00',
1052 '-DPIPE_SUBSYSTEM_WINDOWS_USER',
1053 '-D_USE_MATH_DEFINES', # XXX: scons didn't use this for mingw
1057 '-DVC_EXTRALEAN',
1058 '-D_CRT_SECURE_NO_WARNINGS',
1059 '-D_CRT_SECURE_NO_DEPRECATE',
1060 '-D_SCL_SECURE_NO_WARNINGS',
1061 '-D_SCL_SECURE_NO_DEPRECATE',
1062 '-D_ALLOW_KEYWORD_MACROS',
1063 '-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
1064 '-DNOMINMAX',
1077 pre_args += ['-D__MSVCRT_VERSION__=0x0700']
1081 pre_args += '-D_ISOC11_SOURCE'
1092 '/wd4056', # overflow in floating-point constant arithmetic
1102 '/wd4200', # nonstandard extension used: zero-sized array in struct/union
1116 '-Werror=implicit-function-declaration',
1117 '-Werror=missing-prototypes',
1118 '-Werror=return-type',
1119 '-Werror=empty-body',
1120 '-Werror=incompatible-pointer-types',
1121 '-Werror=int-conversion',
1122 '-Wimplicit-fallthrough',
1123 '-Wmisleading-indentation',
1124 '-Wno-missing-field-initializers',
1125 '-Wno-format-truncation',
1126 '-Wno-nonnull-compare',
1127 '-fno-math-errno',
1128 '-fno-trapping-math',
1129 '-Qunused-arguments',
1130 '-fno-common',
1131 '-Wno-unknown-pragmas',
1133 '-Wno-microsoft-enum-value',
1134 '-Wno-unused-function',
1137 '-Werror=return-type',
1138 '-Werror=empty-body',
1139 '-Wmisleading-indentation',
1140 '-Wno-non-virtual-dtor',
1141 '-Wno-missing-field-initializers',
1142 '-Wno-format-truncation',
1143 '-fno-math-errno',
1144 '-fno-trapping-math',
1145 '-Qunused-arguments',
1147 # gcc does aggressive dead-store elimination which threats all writes
1150 '-flifetime-dse=1',
1151 '-Wno-unknown-pragmas',
1153 '-Wno-microsoft-enum-value',
1158 _trial_c += ['-Werror=format', '-Wformat-security']
1159 _trial_cpp += ['-Werror=format', '-Wformat-security']
1164 _trial_c += ['-Werror=thread-safety']
1172 args : '-Wl,--gc-sections', name : 'gc-sections')
1173 ld_args_gc_sections += '-Wl,--gc-sections'
1174 _trial_c += ['-ffunction-sections', '-fdata-sections']
1175 _trial_cpp += ['-ffunction-sections', '-fdata-sections']
1179 # are disabled. Don't treat this as an error, since we build with -Werror even if
1182 _trial_c += ['-Wno-unused-variable', '-Wno-unused-but-set-variable', '/wd4189']
1183 _trial_cpp += ['-Wno-unused-variable', '-Wno-unused-but-set-variable', '/wd4189']
1190 ['-Wno-override-init', '-Wno-initializer-overrides']
1196 _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer']
1219 '-Wl,--nxcompat',
1220 '-Wl,--dynamicbase',
1221 '-static-libgcc',
1222 '-static-libstdc++',
1228 '-Wl,--nxcompat',
1229 '-Wl,--dynamicbase',
1230 '-static-libgcc',
1231 '-static-libstdc++',
1243 pre_args += '-DUSE_SSE41'
1247 sse41_args = ['-msse4.1']
1251 sse2_arg = ['-msse2', '-mfpmath=sse']
1252 sse2_args = [sse2_arg, '-mstackrealign']
1260 # -mstackrealign or -mincoming-stack-boundary=2.
1262 # XXX: We could have SSE without -mstackrealign if we always used
1270 # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
1272 sse41_args += '-mstackrealign'
1279 if cc.has_function('__builtin_ia32_clflushopt', args : '-mclflushopt')
1280 pre_args += '-DHAVE___BUILTIN_IA32_CLFLUSHOPT'
1281 clflushopt_args = ['-mclflushopt']
1301 pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
1303 # Not all atomic calls can be turned into lock-free instructions, in which
1305 # link with -latomic.
1307 # This can happen for 64-bit atomic operations on 32-bit architectures such
1317 name : 'GCC atomic builtins required -latomic')
1328 pre_args += '-DMISSING_64BIT_ATOMICS'
1339 pre_args += ['-DUSE_X86_ASM']
1342 pre_args += ['-DGLX_X86_READONLY_TEXT']
1348 pre_args += ['-DUSE_X86_64_ASM']
1353 pre_args += ['-DUSE_ARM_ASM']
1358 pre_args += ['-DUSE_AARCH64_ASM']
1363 pre_args += ['-DUSE_SPARC_ASM']
1368 pre_args += ['-DUSE_PPC64LE_ASM']
1373 pre_args += ['-DUSE_MIPS64EL_ASM']
1378 pre_args += ['-DUSE_LOONGARCH64_ASM']
1386 pre_args += '-DMAJOR_IN_SYSMACROS'
1391 pre_args += '-DMAJOR_IN_MKDEV'
1395 pre_args += '-DHAS_SCHED_H'
1397 pre_args += '-DHAS_SCHED_GETAFFINITY'
1404 pre_args += '-DHAVE_SYS_SYSCTL_H'
1411 pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
1430 pre_args += '-DHAVE_@0@'.format(f.to_upper())
1448 pre_args += '-DHAVE_GNU_QSORT_R'
1462 pre_args += '-DHAVE_BSD_QSORT_R'
1466 pre_args += '-DHAVE_STRUCT_TIMESPEC'
1473 pre_args += '-DHAVE_THRD_CREATE'
1479 args : '-D_GNU_SOURCE')
1480 pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
1486 args : '-D_GNU_SOURCE')
1487 pre_args += '-DHAVE_ISSIGNALING'
1493 # non-windows platforms.
1496 pre_args += '-DHAVE_POSIX_MEMALIGN'
1502 pre_args += '-DHAVE_DIRENT_D_TYPE'
1524 pre_args += '-DHAVE_STRTOD_L'
1529 if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic')
1530 ld_args_bsymbolic += '-Wl,-Bsymbolic'
1534 args : '-Wl,--version-script=@0@'.format(
1535 join_paths(meson.current_source_dir(), 'build-support/conftest.map')),
1536 name : 'version-script')
1541 args : '-Wl,--dynamic-list=@0@'.format(
1542 join_paths(meson.current_source_dir(), 'build-support/conftest.dyn')),
1543 name : 'dynamic-list')
1547 ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
1557 pre_args += '-DHAVE_DLADDR'
1562 pre_args += '-DHAVE_DL_ITERATE_PHDR'
1568 pre_args += '-DSUPPORT_INTEL_INTEGRATED_GPUS'
1587 pre_args += '-DHAVE_ZLIB'
1592 pre_args += '-DHAVE_ZSTD'
1597 pre_args += '-DHAVE_COMPRESSION'
1611 pre_args += '-DHAVE_PTHREAD'
1616 args : '-D_GNU_SOURCE')
1617 pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
1646 pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
1655 dep_regex = declare_dependency(compile_args : ['-DNO_REGEX'])
1667 if (get_option('min-windows-version') < 8)
1668 pre_args += '-DWINDOWS_NO_FUTEX'
1722 # dependencies (such as vk-runtime) linking to it
1726 pre_args += '-DHAVE_LIBDRM'
1734 pre_args += '-DHAVE_LIBUDEV'
1750 # all-targets is needed to support static linking LLVM build with multiple targets
1752 llvm_optional_modules += ['all-targets', 'frontendopenmp', 'windowsdriver']
1756 # all-targets is needed to support static linking LLVM build with multiple targets.
1759 llvm_optional_modules += ['all-targets', 'windowsdriver', 'frontendhlsl', 'frontenddriver']
1761 draw_with_llvm = get_option('draw-use-llvm')
1767 amd_with_llvm = get_option('amd-use-llvm')
1773 llvm_with_orcjit = get_option('llvm-orcjit') or not llvm_has_mcjit
1783 _shared_llvm = get_option('shared-llvm') \
1793 method : host_machine.system() == 'windows' ? 'auto' : 'config-tool',
1808 pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
1809 pre_args += '-DLLVM_IS_SHARED=@0@'.format(_shared_llvm.to_int())
1827 # The CMake finder will return 'ON', the llvm-config will return 'YES'
1828 _llvm_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
1847 error('ACO tests require LLVM, but LLVM is disabled.')
1860 pre_args += '-DLLVM_AVAILABLE=@0@'.format(with_llvm.to_int())
1861 pre_args += '-DDRAW_LLVM_AVAILABLE=@0@'.format((with_llvm and draw_with_llvm).to_int())
1862 pre_args += '-DAMD_LLVM_AVAILABLE=@0@'.format(amd_with_llvm.to_int())
1863 pre_args += '-DGALLIVM_USE_ORCJIT=@0@'.format((with_llvm and llvm_with_orcjit).to_int())
1870 # Require an SPIRV-LLVM-Translator version compatible with the chosen LLVM
1874 # we do not want to accept SPIRV-LLVM-Translator 8.0.0.1 as that version
1887 # LLVMSPIRVLib is available at https://github.com/KhronosGroup/SPIRV-LLVM-Translator
1894 'SPIRV-Tools',
1899 pre_args += '-DHAVE_SPIRV_TOOLS'
1906 dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
1932 dep_lua = dependency('lua54', 'lua5.4', 'lua-5.4',
1933 'lua53', 'lua5.3', 'lua-5.3',
1950 pre_args += '-DUSE_LIBELF'
1957 pre_args += '-DHAVE_VALGRIND'
1964 asan_c_args = ['-DBUILT_WITH_ASAN=1']
1966 asan_c_args = ['-DBUILT_WITH_ASAN=0']
1972 pre_args += '-DTHREAD_SANITIZER=1'
1973 # meson versions prior to 1.4 will warn "Consider using the built-in option for sanitizers ..."
1974 # later on because it only checks whether the option starts with "-fsanitize",
1975 # but there is no built-in option for adding a blacklist
1976 tsan_blacklist = '-fsanitize-blacklist=@0@'.format(join_paths(meson.project_source_root(), 'build-support', 'tsan-blacklist.txt'))
1980 warning('Compiler does not support "-fsanitize-blacklist", expected race conditions will not be surpressed')
1983 pre_args += '-DTHREAD_SANITIZER=0'
1997 prog_flex = [prog_flex, '--wincompat']
2003 prog_flex += '-DYY_USE_CONST='
2010 prog_flex_cpp += '-D__STDC_VERSION__=199901'
2025 # old-bison compat. See discussion in
2028 prog_bison = [prog_bison, '-Wno-deprecated']
2043 pre_args += '-DHAVE_LIBUNWIND'
2060 dep_wl_scanner = dependency('wayland-scanner', native: true)
2063 wl_scanner_arg = 'private-code'
2067 dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.38', default_options: [ 'tests=false' ])
2068 dep_wayland_client = dependency('wayland-client', version : '>=1.18')
2069 dep_wayland_server = dependency('wayland-server', version : '>=1.18')
2071 dep_wayland_egl = dependency('wayland-egl-backend', version : '>= 3')
2074 pre_args += '-DWL_HIDE_DEPRECATED'
2077 prefix : '#include <wayland-client.h>',
2079 pre_args += ['-DHAVE_WL_DISPATCH_QUEUE_TIMEOUT']
2083 prefix : '#include <wayland-client.h>',
2085 pre_args += ['-DHAVE_WL_CREATE_QUEUE_WITH_NAME']
2094 pre_args += ['-DHAVE_OPENMP']
2132 dep_xcb_xrandr = dependency('xcb-randr')
2140 dep_xcb_glx = dependency('xcb-glx', version : dep_xcb_glx_version)
2141 dep_xcb_shm = dependency('xcb-shm')
2149 dep_xcb_keysyms = dependency('xcb-keysyms', required : false)
2152 pre_args += '-DXCB_KEYSYMS_AVAILABLE'
2154 dep_x11_xcb = dependency('x11-xcb')
2155 dep_xcb_dri2 = dependency('xcb-dri2', version : dep_xcb_dri2_version, required : with_x11_dri2)
2161 dep_xcb_dri2 = dependency('xcb-dri2', version : dep_xcb_dri2_version, required : with_x11_dri2)
2163 dep_xcb_dri3 = dependency('xcb-dri3', version : dep_xcb_dri3_version)
2164 dep_xcb_present = dependency('xcb-present', version : dep_xcb_present_version)
2169 dep_xcb_shm = dependency('xcb-shm')
2170 dep_xcb_sync = dependency('xcb-sync')
2172 pre_args += '-DHAVE_X11_DRM'
2189 dep_xcb_xfixes = dependency('xcb-xfixes')
2192 dep_xcb_dri3 = dependency('xcb-dri3', version : dep_xcb_dri3_version)
2193 dep_xcb_present = dependency('xcb-present', version : dep_xcb_present_version)
2194 dep_xcb_shm = dependency('xcb-shm')
2198 dep_xcb_xrandr = dependency('xcb-randr')
2206 pre_args += '-DHAVE_DRI'
2209 pre_args += '-DHAVE_DRI2'
2212 pre_args += '-DHAVE_X11_DRI2'
2215 pre_args += '-DHAVE_DRI3_EXPLICIT_SYNC'
2218 pre_args += '-DHAVE_DRISW_KMS'
2221 if get_option('gallium-extra-hud')
2222 pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
2227 pre_args += '-DHAVE_LIBSENSORS=1'
2230 _shader_replacement = get_option('custom-shader-replacement')
2233 pre_args += '-DCUSTOM_SHADER_REPLACEMENT'
2241 pre_args += '-DHAVE_PERFETTO'
2253 pre_args += '-DHAVE_GPUVIS'
2268 'x11', 'xext', 'xfixes', 'x11-xcb', 'xcb',
2269 'xcb-glx >= 1.8.1']
2271 gl_priv_reqs += 'xcb-dri2 >= 1.8'
2283 gl_priv_libs += ['-lpthread', '-pthread']
2286 gl_priv_libs += '-lm'
2289 gl_priv_libs += '-ldl'
2295 gbm_priv_libs += '-ldl'
2304 symbols_check_args = ['--dumpbin', prog_dumpbin.full_path()]
2309 symbols_check_args = ['--nm', prog_nm.full_path()]
2314 gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
2328 sphinx = find_program('sphinx-build', version : '>= 4.3',
2329 required: get_option('html-docs'))
2405 vulkan_summary += {'Layers': get_option('vulkan-layers')}
2459 gallium_summary += {'Off-screen rendering (OSMesa)': with_osmesa ? 'lib' + osmesa_lib_name : false}
2460 gallium_summary += {'HUD lm-sensors': dep_lmsensors.found()}