summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--header_checks/meson.build8
-rw-r--r--meson.build43
2 files changed, 27 insertions, 24 deletions
diff --git a/header_checks/meson.build b/header_checks/meson.build
index cb47b040d4..0b4ffe35fc 100644
--- a/header_checks/meson.build
+++ b/header_checks/meson.build
@@ -1,11 +1,11 @@
1if get_option('native-arch-optimization') 1if get_option('native-arch-optimization')
2 if target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64' 2 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
3 native_header = 'immintrin.h' 3 native_header = 'immintrin.h'
4 elif target_machine.cpu_family() == 'arm' 4 elif host_machine.cpu_family() == 'arm'
5 native_header = 'arm_neon.h' 5 native_header = 'arm_neon.h'
6 elif target_machine.cpu_family() == 'aarch64' 6 elif host_machine.cpu_family() == 'aarch64'
7 native_header = 'arm_neon.h' 7 native_header = 'arm_neon.h'
8 elif target_machine.cpu_family() == 'ppc' or target_machine.cpu_family() == 'ppc64' 8 elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64'
9 native_header = 'altivec.h' 9 native_header = 'altivec.h'
10 endif 10 endif
11 11
diff --git a/meson.build b/meson.build
index 7c9890d36d..aa64aaf2c5 100644
--- a/meson.build
+++ b/meson.build
@@ -4,7 +4,7 @@ project('efl', ['c','cpp'],
4 meson_version : '>=0.47' 4 meson_version : '>=0.47'
5) 5)
6 6
7if target_machine.system() == 'darwin' 7if host_machine.system() == 'darwin'
8 add_languages('objc') 8 add_languages('objc')
9endif 9endif
10 10
@@ -41,7 +41,7 @@ endif
41 41
42#prepare a special linker args flag for binaries on macos 42#prepare a special linker args flag for binaries on macos
43bin_linker_args = [] 43bin_linker_args = []
44if target_machine.system() == 'darwin' 44if host_machine.system() == 'darwin'
45 bin_linker_args = ['-pagezero_size', '10000', '-image_base', '100000000'] 45 bin_linker_args = ['-pagezero_size', '10000', '-image_base', '100000000']
46endif 46endif
47 47
@@ -110,37 +110,40 @@ if cc.compiles(code, args : '-lc', name : 'environ check') == true
110 config_h.set10('HAVE_ENVIRON', true) 110 config_h.set10('HAVE_ENVIRON', true)
111endif 111endif
112 112
113## or should this be target_machine?
114cpu_sse3 = false 113cpu_sse3 = false
115cpu_neon = false 114cpu_neon = false
116cpu_neon_intrinsics = false 115cpu_neon_intrinsics = false
117native_arch_opt_c_args = [ '-msse3' ] 116native_arch_opt_c_args = [ ]
118 117
119if target_machine.endian() == 'big' 118if host_machine.endian() == 'big'
120 config_h.set10('WORDS_BIGENDIAN', true) 119 config_h.set10('WORDS_BIGENDIAN', true)
121endif 120endif
122 121
123if get_option('native-arch-optimization') 122if get_option('native-arch-optimization')
124 if target_machine.cpu_family() == 'x86' or target_machine.cpu_family() == 'x86_64' 123 if host_machine.cpu_family() == 'x86' or host_machine.cpu_family() == 'x86_64'
124 cpu_sse3 = true
125 config_h.set10('BUILD_MMX', true) 125 config_h.set10('BUILD_MMX', true)
126 message('x86 build - MMX enabled')
127 config_h.set10('BUILD_SSE3', true) 126 config_h.set10('BUILD_SSE3', true)
128 cpu_sse3 = true 127 native_arch_opt_c_args = [ '-msse3' ]
129 message('x86 build - SSE3 enabled') 128 message('x86 build - MMX + SSE3 enabled')
130 elif target_machine.cpu_family() == 'arm' 129 elif host_machine.cpu_family() == 'arm'
131 config_h.set10('BUILD_NEON', true)
132 cpu_neon = true 130 cpu_neon = true
133 message('ARM build - NEON enabled')
134 elif target_machine.cpu_family() == 'aarch64'
135 config_h.set10('BUILD_NEON', true) 131 config_h.set10('BUILD_NEON', true)
136 config_h.set10('BUILD_NEON_INTRINSICS', true) 132 add_global_arguments('-mfpu=neon', language: 'c')
137 add_global_arguments('-ftree-vectorize', language: 'c') 133 add_global_arguments('-ftree-vectorize', language: 'c')
134 message('ARM build - NEON enabled')
135 elif host_machine.cpu_family() == 'aarch64'
138 cpu_neon = true 136 cpu_neon = true
139 cpu_neon_intrinsics = true 137 cpu_neon_intrinsics = true
138 config_h.set10('BUILD_NEON', true)
139 config_h.set10('BUILD_NEON_INTRINSICS', true)
140 add_global_arguments('-ftree-vectorize', language: 'c')
141 native_arch_opt_c_args = [ '-ftree-vectorize' ]
140 message('ARM64 build - NEON + intrinsics enabled') 142 message('ARM64 build - NEON + intrinsics enabled')
141 elif target_machine.cpu_family() == 'ppc' or target_machine.cpu_family() == 'ppc64' 143 elif host_machine.cpu_family() == 'ppc' or host_machine.cpu_family() == 'ppc64'
142 config_h.set10('BUILD_ALTIVEC', true) 144 config_h.set10('BUILD_ALTIVEC', true)
143 add_global_arguments('-maltivec-vectorize', language: 'c') 145 add_global_arguments('-maltivec-vectorize', language: 'c')
146 add_global_arguments('-maltivec', language: 'c')
144 message('PPC/POWER build - ALTIVEC enabled') 147 message('PPC/POWER build - ALTIVEC enabled')
145 endif 148 endif
146endif 149endif
@@ -154,10 +157,10 @@ bsd = ['bsd', 'freebsd', 'dragonfly', 'netbsd']
154linux = ['linux'] 157linux = ['linux']
155osx = ['darwin'] 158osx = ['darwin']
156 159
157sys_linux = linux.contains(target_machine.system()) 160sys_linux = linux.contains(host_machine.system())
158sys_bsd = bsd.contains(target_machine.system()) 161sys_bsd = bsd.contains(host_machine.system())
159sys_windows = windows.contains(target_machine.system()) 162sys_windows = windows.contains(host_machine.system())
160sys_osx = osx.contains(target_machine.system()) 163sys_osx = osx.contains(host_machine.system())
161 164
162if sys_linux == true or sys_bsd == true 165if sys_linux == true or sys_bsd == true
163 sys_lib_extension = 'so' 166 sys_lib_extension = 'so'
@@ -172,7 +175,7 @@ elif sys_osx == true
172 sys_exe_extension = '' 175 sys_exe_extension = ''
173 sys_mod_extension = 'dylib' 176 sys_mod_extension = 'dylib'
174else 177else
175 error('System '+target_machine.system()+' not known') 178 error('System '+host_machine.system()+' not known')
176endif 179endif
177 180
178if (get_option('crypto') == 'gnutls') 181if (get_option('crypto') == 'gnutls')