In our Meson setup it automatically detects whether ICONV_OMITS_BOM
should be defined. To check this, a piece of code is compiled and ran.
When cross-compiling, it's not possible to run this piece of code. Guard
this test with a can_run_host_binaries() check to ensure it can run.
Signed-off-by: Toon Claes <toon@iotcl.com>
Acked-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
}
'''
- if compiler.run(iconv_omits_bom_source,
+ if meson.can_run_host_binaries() and compiler.run(iconv_omits_bom_source,
dependencies: iconv,
name: 'iconv omits BOM',
).returncode() != 0