build: Use Visual Studio-specific flags for AVX
Needed for now, but unstable-simd is likely a better fix for all our SIMD building.
This commit is contained in:
parent
c6abf6cd3f
commit
06157f1659
@ -174,6 +174,13 @@ common_cxxflags = common_cflags
|
||||
common_deps = os_deps + [absl_dep]
|
||||
webrtc_inc = include_directories('.')
|
||||
|
||||
# FIXME: use the unstable-simd module instead
|
||||
if cc.get_define('_MSC_VER') != ''
|
||||
avx_flags = ['/arch:AVX2']
|
||||
else
|
||||
avx_flags = ['-mavx2', '-mfma']
|
||||
endif
|
||||
|
||||
subdir('webrtc')
|
||||
|
||||
pkgconfig = import('pkgconfig')
|
||||
|
@ -83,8 +83,8 @@ if have_x86
|
||||
],
|
||||
dependencies: common_deps,
|
||||
include_directories: webrtc_inc,
|
||||
c_args: common_cflags + ['-mavx2', '-mfma'],
|
||||
cpp_args: common_cxxflags + ['-mavx2', '-mfma']
|
||||
c_args: common_cflags + avx_flags,
|
||||
cpp_args: common_cxxflags + avx_flags
|
||||
)
|
||||
]
|
||||
endif
|
||||
|
@ -177,8 +177,8 @@ if have_x86
|
||||
],
|
||||
dependencies: common_deps,
|
||||
include_directories: webrtc_inc,
|
||||
c_args: common_cflags + apm_flags + ['-mavx2', '-mfma'],
|
||||
cpp_args: common_cxxflags + apm_flags + ['-mavx2', '-mfma']
|
||||
c_args: common_cflags + apm_flags + avx_flags,
|
||||
cpp_args: common_cxxflags + apm_flags + avx_flags
|
||||
)
|
||||
]
|
||||
endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user