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:
@@ -121,6 +121,10 @@ init_map(void)
|
||||
void *
|
||||
u_execmem_alloc(unsigned int size)
|
||||
{
|
||||
#ifndef MESA_EXECMEM
|
||||
(void)size;
|
||||
return NULL;
|
||||
#else
|
||||
void *addr = NULL;
|
||||
|
||||
mtx_lock(&exec_mutex);
|
||||
@@ -140,6 +144,7 @@ bail:
|
||||
mtx_unlock(&exec_mutex);
|
||||
|
||||
return addr;
|
||||
#endif /* MESA_EXECMEM */
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user