From 477943cc9d08c6945d5fd284083f425e852bf4f1 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Thu, 7 Mar 2024 13:18:46 +0200 Subject: [PATCH] meson: Allow building intel-clc for the host if it can be run In what is probably the most common case cross of compilation, x86_64 -> x86, it should be possible to build intel-clc for the host machine and run it. Doing so simplifies the build by not needing to be able to cross compile half of mesa, and should ease developer and distro strain for building Intel drivers for x86. Part-of: --- src/intel/compiler/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/intel/compiler/meson.build b/src/intel/compiler/meson.build index 17dc4146231..da9a958190a 100644 --- a/src/intel/compiler/meson.build +++ b/src/intel/compiler/meson.build @@ -181,7 +181,10 @@ elif with_intel_clc link_args : [ld_args_build_id], dependencies : [idep_nir, idep_vtn, idep_mesaclc, idep_mesautil, idep_intel_dev, idep_intel_compiler_brw], - native : true, + # If we can run host binaries directly, just build intel_clc for the host. + # Most commonly this happens when doing a cross compile from an x86_64 build + # machine to an x86 host + native : not meson.can_run_host_binaries(), install : get_option('install-intel-clc'), ) dep_prog_intel_clc = [prog_intel_clc]