summaryrefslogtreecommitdiff
path: root/third_party
diff options
context:
space:
mode:
Diffstat (limited to 'third_party')
-rw-r--r--third_party/aesni-intel/wscript13
1 files changed, 11 insertions, 2 deletions
diff --git a/third_party/aesni-intel/wscript b/third_party/aesni-intel/wscript
index 002ba5d42d1..eb92d6626fe 100644
--- a/third_party/aesni-intel/wscript
+++ b/third_party/aesni-intel/wscript
@@ -1,8 +1,17 @@
#!/usr/bin/env python
+import Options
+import Utils
def configure(conf):
- if conf.CHECK_CFLAGS('-Wp,-E,-lang-asm', '') and conf.env['SYSTEM_UNAME_MACHINE'] == 'x86_64':
- conf.DEFINE('HAVE_AESNI_INTEL', 1)
+ if Options.options.accel_aes.lower() == "intelaesni":
+ if conf.CHECK_CFLAGS('-Wp,-E,-lang-asm', ''):
+ if conf.env['SYSTEM_UNAME_MACHINE'] == 'x86_64':
+ print("Compiling with Intel AES instructions")
+ conf.DEFINE('HAVE_AESNI_INTEL', 1)
+ else:
+ raise Utils.WafError('--aes-accel=intelaesni selected and non x86_64 CPU')
+ else:
+ raise Utils.WafError('--aes-accel=intelaesni selected and compiler rejects -Wp,-E,-lang-asm')
def build(bld):
if not bld.CONFIG_SET('HAVE_AESNI_INTEL'):