add execmem build option

The execmem option can be set to false to disable the dynamic
dispatch patching that requires mmap(PROT_WRITE | PROT_EXEC),
which is undesirable on some platforms.

Signed-off-by: John Bates <jbates@chromium.org>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10987>
This commit is contained in:
John Bates
2021-05-25 13:21:40 -07:00
committed by Marge Bot
parent 8b7ff78443
commit df1a4e749f
3 changed files with 19 additions and 1 deletions

View File

@@ -377,7 +377,13 @@ option(
'selinux',
type : 'boolean',
value : false,
description : 'Build an SELinux-aware Mesa'
description : 'Build an SELinux-aware Mesa. This currently disables execmem support at runtime unless SELinux is configured with allow_execmem.'
)
option(
'execmem',
type : 'boolean',
value : true,
description : 'Enable execmem support. Without execmem, glapi will fail to generate dynamic glapi stubs when entrypoints unknown to glapi but known to DRI drivers are requested in eglGetProcAddress or glXGetProcAddress. This should be enabled unless the platform can guarantee glapi and DRI drivers are always built from the same source tree.'
)
option(
'osmesa',