X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=meson.build;h=a210b39cd890a301db8add446a73aab1977d3f9b;hb=f84c9ad17abfcfa66e9c0f0f23fdb387b29335e1;hp=542c35d525b9844511095395d36722b0dda6f4b4;hpb=f7b6a8d12fdc446e325129033e5f61e3bbafb0b2;p=mesa.git diff --git a/meson.build b/meson.build index 542c35d525b..a210b39cd89 100644 --- a/meson.build +++ b/meson.build @@ -158,7 +158,7 @@ if gallium_drivers.contains('auto') elif ['arm', 'aarch64'].contains(host_machine.cpu_family()) gallium_drivers = [ 'kmsro', 'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', - 'tegra', 'virgl', 'lima', 'swrast' + 'tegra', 'virgl', 'lima', 'panfrost', 'swrast' ] else error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format( @@ -252,6 +252,7 @@ endif if host_machine.system() == 'darwin' with_dri_platform = 'apple' + pre_args += '-DBUILDING_MESA' elif ['windows', 'cygwin'].contains(host_machine.system()) with_dri_platform = 'windows' elif system_has_kms_drm @@ -374,7 +375,11 @@ if with_egl and not (with_platform_drm or with_platform_surfaceless or with_plat endif endif -pre_args += '-DGLX_USE_TLS' +# Android uses emutls for versions <= P/28. For USE_ELF_TLS we need ELF TLS. +if not with_platform_android or get_option('platform-sdk-version') >= 29 + pre_args += '-DUSE_ELF_TLS' +endif + if with_glx != 'disabled' if not (with_platform_x11 and with_any_opengl) error('Cannot build GLX support without X11 platform support and at least one OpenGL API') @@ -1029,12 +1034,19 @@ foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h' endif endforeach -foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create'] +foreach f : ['strtof', 'mkostemp', 'posix_memalign', 'timespec_get', 'memfd_create', 'random_r'] if cc.has_function(f) pre_args += '-DHAVE_@0@'.format(f.to_upper()) endif endforeach +if cc.has_header_symbol('errno.h', 'program_invocation_name', + args : '-D_GNU_SOURCE') + pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME' +elif with_tools.contains('intel') + error('Intel tools require the program_invocation_name variable') +endif + # strtod locale support if cc.links(''' #define _GNU_SOURCE