From 799b39afc5b36ce78a4be0c62a04639d5075fc33 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 21 Jun 2019 16:45:40 +0200 Subject: meson: do not error when no optimization architecture is there MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this should fix building on architectures that do not have native optimization support in efl. fix T8028 Reviewed-by: Dan HorĂ¡k <@sharkcz> Differential Revision: https://phab.enlightenment.org/D9150 --- header_checks/meson.build | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'header_checks') diff --git a/header_checks/meson.build b/header_checks/meson.build index 2844e50f3c..8ead497882 100644 --- a/header_checks/meson.build +++ b/header_checks/meson.build @@ -1,4 +1,5 @@ if get_option('native-arch-optimization') + check_native_header = true if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64' native_header = 'immintrin.h' elif host_machine.cpu_family() == 'arm' @@ -7,13 +8,17 @@ if get_option('native-arch-optimization') native_header = 'arm_neon.h' elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64' native_header = 'altivec.h' + else + check_native_header = false endif - if cc.has_header(native_header) == false - error('Error, header '+native_header+' is required') - endif + if check_native_header + if cc.has_header(native_header) == false + error('Error, header '+native_header+' is required') + endif - config_h.set10('HAVE_'+native_header.underscorify().to_upper(), true) + config_h.set10('HAVE_'+native_header.underscorify().to_upper(), true) + endif endif header_checks = [ -- cgit v1.2.1