]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/lua/meson.build: disable kres_gen_test on cross
authorVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 5 Aug 2021 08:10:16 +0000 (10:10 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Thu, 5 Aug 2021 08:13:40 +0000 (10:13 +0200)
I considered switching it to our usual 3-option combo,
but that way didn't really seem useful.

daemon/lua/meson.build

index 565ccfd1ca2ac7e7c6ab34f5732a0c467e27c30e..476d107ea25eba3d541fefe0e92aede001626f98 100644 (file)
@@ -56,8 +56,9 @@ run_target(  # run manually to re-generate kres-gen.lua
 # A simple config test: check that sizes of some structures match
 # in C and pre-generated lua bindings.
 # The point is that regeneration is quite expensive in time and dependencies,
-# but this basic sanity check could be ran always.
-if get_option('kres_gen_test')
+# but this basic sanity check could be ran always, except for cross compilation,
+# as we *run* luajit to find out the real sizes.
+if get_option('kres_gen_test') and not meson.is_cross_build()
   types_to_check = {
     'time_t' : '#include <sys/time.h>',
     'struct timeval' : '#include <sys/time.h>',