diff --git a/libs/ardour/wscript b/libs/ardour/wscript index 5d9a09d37e..3771d24a0f 100644 --- a/libs/ardour/wscript +++ b/libs/ardour/wscript @@ -414,8 +414,20 @@ def build(bld): u = PLATFORM.uname () cpu = u[4] if re.search ("(x86_64|AMD64)", cpu) != None: - obj.source += [ 'sse_functions_xmm.cc', 'sse_functions_avx.cc' ] + obj.source += [ 'sse_functions_xmm.cc' ] obj.source += [ 'sse_functions_64bit_win.s', 'sse_avx_functions_64bit_win.s' ] + + # as long as we want to use AVX intrinsics in this file, + # compile it with -mavx flag - append avx flag to the existing + avx_cxxflags = list(bld.env['CXXFLAGS']) + avx_cxxflags.append ('-mavx') + + bld(features = 'cxx', + source = 'sse_functions_avx.cc', + cxxflags = avx_cxxflags, + target = 'sse_avx_functions') + + obj.use += ['sse_avx_functions'] # i18n if bld.is_defined('ENABLE_NLS'): diff --git a/wscript b/wscript index dee423afce..134e2f7445 100755 --- a/wscript +++ b/wscript @@ -266,7 +266,7 @@ def set_compiler_flags (conf,opt): # mingw GCC compiler to uses at&t (Unix specific) assembler dialect by default # compiler_flags.append (["--mmnemonic=att", "msyntax=att") - compiler_flags.extend (["-mavx", "-mvzeroupper", "-DUSE_XMMINTRIN"]) + compiler_flags.extend (["-DUSE_XMMINTRIN"]) # end of processor-specific section