3.1 KiB
short-description: Notes and known issues for specific platforms ...
Platform notes
This page collects information that is specific to a platform or to a toolchain.
macOS deployment target
Programs can be compiled for older macOS versions than the one they are compiled on. The version of the build machine therefore does not tell which functions are available when the program runs.
The deployment target is chosen by the compiler. Either set the MACOSX_DEPLOYMENT_TARGET
environment variable before running Meson, or pass -mmacosx-version-min in both the compile
and the link arguments, for example in a native file:
[built-in options]
c_args = ['-mmacosx-version-min=10.11']
c_link_args = ['-mmacosx-version-min=10.11']
The checks that Meson runs use the same arguments, so they see the deployment target.
When detecting a function with compiler.has_function(), specify the header that declares it
in the prefix argument. For example, open_memstream was introduced in macOS 10.13. When
building on macOS 10.13 for macOS 10.11, the following check correctly reports the function as
missing:
cc.has_function('open_memstream', prefix : '#include <stdio.h>')
Without the header, the check lacks the availability information and incorrectly reports the function as available.
QNX
Meson can detect and use qcc and q++, the C and C++ compiler drivers shipped with the QNX
Software Development Platform (SDP). For cross compilation, point the [binaries] section of
the cross file at qcc and q++, including the required -V target selector, and set
system = 'qnx' in [host_machine]:
[binaries]
c = ['qcc', '-Vgcc_ntoaarch64le']
cpp = ['q++', '-Vgcc_ntoaarch64le']
[host_machine]
system = 'qnx'
cpu_family = 'aarch64'
cpu = 'aarch64'
endian = 'little'
The following limitations apply:
- ThinLTO incremental cache does not work.
-Db_thinlto_cache=trueraises an error at configure time, while-Db_lto=trueis unaffected. - Alternate linker selection is not supported. Setting
c_ldorcpp_ld(for example tolldorgold) raises an error. - If a header is deleted, stale entries remain in the dependency files, because
-MPdoes not emit phony header rules. A clean build is needed to recover. - There is no static sanitizer runtime, so
-static-libasanis rejected and only the shared runtime can be linked. - The available sanitizers depend on the SDP version. SDP 7.1 only provides
libubsan, so-Db_sanitize=addressand-Db_sanitize=leakfail to link there. SDP 8.0 adds asan and lsan.-Db_sanitize=undefinedworks on both, and tsan is not available on either. - C++20 named modules do not work. With SDP 8.0,
-fmodules-tscompiles but silently ignores.cppmand.ixxfiles. With SDP 7.1,-fmodules-tsis rejected for C++ sources. Plain-fmodulesis rejected on both. This only affects projects that enable modules throughcpp_args. - Relinking is avoided for unchanged shared libraries only on native QNX builds. When cross compiling to QNX, shared libraries are always relinked.