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 <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2024-10-25 01:38:42 +03:00 committed by Arun Raghavan
parent 85556fd38b
commit 5252919799

View File

@ -60,7 +60,6 @@ webrtc_audio_processing_sources = [
'aec3/suppression_gain.cc', 'aec3/suppression_gain.cc',
'aec3/transparent_mode.cc', 'aec3/transparent_mode.cc',
'aecm/aecm_core.cc', 'aecm/aecm_core.cc',
'aecm/aecm_core_c.cc',
'aecm/echo_control_mobile.cc', 'aecm/echo_control_mobile.cc',
'agc/agc.cc', 'agc/agc.cc',
'agc/agc_manager_direct.cc', 'agc/agc_manager_direct.cc',
@ -175,6 +174,10 @@ if have_mips
webrtc_audio_processing_sources += [ webrtc_audio_processing_sources += [
'aecm/aecm_core_mips.cc', 'aecm/aecm_core_mips.cc',
] ]
else
webrtc_audio_processing_sources += [
'aecm/aecm_core_c.cc',
]
endif endif
if have_neon if have_neon