From 53173e4021c1c143364083a3923e0e55fc90ce67 Mon Sep 17 00:00:00 2001 From: Uilian Ries Date: Thu, 11 Jun 2026 09:27:36 +0200 Subject: [PATCH] Fix Windows build for ARM The arm_dnn_map.c was compiled unconditionally when NEON RTCD is active, causing linker errors when DNN is disabled. Signed-off-by: Uilian Ries --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aa7b1ae17..bae854ec3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -563,7 +563,10 @@ if(NOT OPUS_DISABLE_INTRINSICS) target_compile_definitions(opus PRIVATE OPUS_HAVE_RTCD) add_sources_group(opus celt ${celt_sources_arm_rtcd}) add_sources_group(opus silk ${silk_sources_arm_rtcd}) - add_sources_group(opus lpcnet ${dnn_sources_arm_rtcd}) + if(OPUS_DNN) + add_sources_group(opus lpcnet ${dnn_sources_arm_rtcd}) + add_sources_group(opus lpcnet ${dnn_sources_arm_neon}) + endif() else() message(ERROR "Runtime cpu capability detection needed for MAY_HAVE_NEON") endif() @@ -576,7 +579,9 @@ if(NOT OPUS_DISABLE_INTRINSICS) add_sources_group(opus celt ${celt_sources_arm_neon_intr}) add_sources_group(opus silk ${silk_sources_arm_neon_intr}) - if (OPUS_DNN) + if(OPUS_DNN AND NOT OPUS_MAY_HAVE_NEON) + # When NEON is presumed (no RTCD), add nnet_neon directly. + # When MAY_HAVE_NEON (RTCD), nnet_neon is already added in the block above. add_sources_group(opus lpcnet ${dnn_sources_arm_neon}) endif()