Skip to content

Commit 4061692

Browse files
To1negitster
authored andcommitted
meson: use is_cross_build() where possible
In previous commit the first use of meson.can_run_host_binaries() was introduced. This is a guard around compiler.run() to ensure it's actually possible to execute the provided. In other places we've been having the same issue, but here `not meson.is_cross_build()` is used as guard. This does the trick, but it also prevents the code from running even when an exe_wrapper is configured. Switch to using meson.can_run_host_binaries() here as well. There is another place left that still uses `not meson.is_cross_build()`, but here it's a guard around fs.exists(). That function will always run on the build machine, so checking for cross-compilation is still in place here. Signed-off-by: Toon Claes <[email protected]> Acked-by: Patrick Steinhardt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 574ac61 commit 4061692

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ if not has_bsd_sysctl
14921492
endif
14931493
endif
14941494

1495-
if not meson.is_cross_build() and compiler.run('''
1495+
if meson.can_run_host_binaries() and compiler.run('''
14961496
#include <stdio.h>
14971497
14981498
int main(int argc, const char **argv)

0 commit comments

Comments
 (0)