Skip to content

Commit c22ec51

Browse files
MagicalTuxclaude
andcommitted
conditionally enable x86 RTCD/SSE only on x86 architectures
Fixes linker errors on ARM64 where SSE functions like celt_inner_prod_sse were referenced but not compiled. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent eacf224 commit c22ec51

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

config.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@
157157
/* Run bit-exactness checks between optimized and c implementations */
158158
/* #undef OPUS_CHECK_ASM */
159159

160-
/* Use run-time CPU capabilities detection */
160+
/* Use run-time CPU capabilities detection - only on x86/x86_64 */
161+
#if defined(__x86_64__) || defined(__i386__) || defined(_M_IX86) || defined(_M_X64)
161162
#define OPUS_HAVE_RTCD 1
162163

163164
/* Compiler supports X86 AVX2 Intrinsics */
@@ -184,6 +185,8 @@
184185
/* Define if binary requires SSE4.1 intrinsics support */
185186
//#define OPUS_X86_PRESUME_SSE4_1 1
186187

188+
#endif /* x86/x86_64 */
189+
187190
/* Define to the address where bug reports for this package should be sent. */
188191
#define PACKAGE_BUGREPORT "opus@xiph.org"
189192

0 commit comments

Comments
 (0)