Follow-up from "Fix build on iOS simulator"
The following discussion from !78 (merged) should be addressed:
-
@kleisauke started a discussion: cdata.set('HAVE_PTHREAD_JIT', cc.has_function('pthread_jit_write_protect_np', prefix: '#include <pthread.h>'))
Would probably fix this as well. See for example: https://github.com/mesonbuild/meson/pull/11011.
In short, it's a known Meson issue (https://github.com/mesonbuild/meson/issues/3482) that compiling with a new XCode toolchain while targeting an older macOS version (e.g. with the
MACOSX_DEPLOYMENT_TARGET=10.9
env) causes some functions to be incorrectly detected as available. This can be fixed by passing theprefix: '#include <...>'
argument to thecc.has_function()
call.This was originally reported at https://github.com/lovell/sharp/issues/3438.