From fbb175df4e5c3ad4490bd59805dc59fc61bf7c88 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 6 Feb 2023 21:36:09 +0100 Subject: [PATCH] Enable avx512f support for windows builds --- libs/ardour/wscript | 4 ++++ wscript | 1 + 2 files changed, 5 insertions(+) diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 1092963b11..9ad541c15f 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -547,6 +547,10 @@ def build(bld): avx512f_cxxflags.append (bld.env['compiler_flags_dict']['avx']) avx512f_cxxflags.append (bld.env['compiler_flags_dict']['pic']) avx512f_cxxflags.append (bld.env['compiler_flags_dict']['fma']) + # work around issue with mingc/gcc-8 + # https://stackoverflow.com/questions/43152633/invalid-register-for-seh-savexmm-in-cygwin + if bld.env['build_target'] == 'mingw': + avx512f_cxxflags.append ('-fno-asynchronous-unwind-tables') bld(features = 'cxx cxxstlib asm', source = avx512f_sources, diff --git a/wscript b/wscript index 0d3943641c..6b2979d9be 100644 --- a/wscript +++ b/wscript @@ -520,6 +520,7 @@ int main() { return 0; }''', elif conf.env['build_target'] == 'mingw': if re.search ('x86_64-w64', str(conf.env['CC'])) is not None: conf.define ('FPU_AVX_FMA_SUPPORT', 1) + conf.define ('FPU_AVX512F_SUPPORT', 1) elif conf.env['build_target'] == 'i386' or conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64': conf.check_cxx(fragment = "#include \nint main(void) { __m512 a; _mm512_abs_ps(a); _mm512_fmadd_ps(a, a, a); (void) _mm512_reduce_min_ps(a); (void)_mm512_reduce_max_ps(a); return 0; }\n", features = ['cxx'],