From 5252919799210fe0092d8f180d76a2abff54dcb5 Mon Sep 17 00:00:00 2001 From: Alper Nebi Yasak Date: Fri, 25 Oct 2024 01:38:42 +0300 Subject: [PATCH] meson: Avoid default AECM implementation on MIPS Trying to link both aecm/aecm_core_mips.cc and aecm/aecm_core_c.cc into the same library results in an error because they both try to implement webrtc::WebRtcAecm_ProcessBlock(): [306/306] Linking target webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3 FAILED: webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3 c++ @webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.rsp /usr/bin/ld: webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.p/aecm_aecm_core_mips.cc.o: in function `webrtc::WebRtcAecm_ProcessBlock(webrtc::AecmCore*, short const*, short const*, short const*, short*)': [...]/webrtc/modules/audio_processing/aecm/aecm_core_mips.cc:934: multiple definition of `webrtc::WebRtcAecm_ProcessBlock(webrtc::AecmCore*, short const*, short const*, short const*, short*)'; webrtc/modules/audio_processing/libwebrtc-audio-processing-1.so.3.p/aecm_aecm_core_c.cc.o:[...]/webrtc/modules/audio_processing/aecm/aecm_core_c.cc:377: first defined here collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed. The MIPS-specific file is a replacement for the other, unlike the NEON case. Don't add the default implementation unconditionally, add it only for non-MIPS builds. Signed-off-by: Alper Nebi Yasak --- webrtc/modules/audio_processing/meson.build | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webrtc/modules/audio_processing/meson.build b/webrtc/modules/audio_processing/meson.build index 2a2b23b..b319b0b 100644 --- a/webrtc/modules/audio_processing/meson.build +++ b/webrtc/modules/audio_processing/meson.build @@ -60,7 +60,6 @@ webrtc_audio_processing_sources = [ 'aec3/suppression_gain.cc', 'aec3/transparent_mode.cc', 'aecm/aecm_core.cc', - 'aecm/aecm_core_c.cc', 'aecm/echo_control_mobile.cc', 'agc/agc.cc', 'agc/agc_manager_direct.cc', @@ -175,6 +174,10 @@ if have_mips webrtc_audio_processing_sources += [ 'aecm/aecm_core_mips.cc', ] +else + webrtc_audio_processing_sources += [ + 'aecm/aecm_core_c.cc', + ] endif if have_neon