[vlc-commits] [Git][videolan/vlc][master] 2 commits: contrib: add a macro to check the minimum clang version
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Sep 16 10:46:28 UTC 2025
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
219cbe1f by Steve Lhomme at 2025-09-16T10:04:46+00:00
contrib: add a macro to check the minimum clang version
- - - - -
fc19f61f by Steve Lhomme at 2025-09-16T10:04:46+00:00
contrib: vpx: disable neon_dotprod with Apple Clang 12
It fails to compile with the provided intrinsics although the code is correct.
```
../vpx_dsp/arm/vpx_convolve8_neon_dotprod.c:55:19: error: initializing 'int32x4_t' (vector of 4 'int32_t' values) with an expression of incompatible type '__attribute__((__vector_size__(4 * sizeof(uint32_t)))) uint32_t' (vector of 4 'uint32_t' values)
int32x4_t sum = vdotq_lane_s32(acc, perm_samples, filters, 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.0/include/arm_neon.h:37021:11: note: expanded from macro 'vdotq_lane_s32'
int32x4_t __reint1 = __builtin_shufflevector(*(uint32x2_t *) &__reint, *(uint32x2_t *) &__reint, __p3, __p3, __p3, __p3); \
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
Fixes #29292
- - - - -
2 changed files:
- contrib/src/main.mak
- contrib/src/vpx/rules.mak
Changes:
=====================================
contrib/src/main.mak
=====================================
@@ -159,6 +159,10 @@ endif
ifneq ($(findstring clang, $(shell $(CC) --version 2>/dev/null)),)
HAVE_CLANG := 1
+CLANG_VERSION := $(shell $(CC) --version | head -1 | grep -o '[0-9]\+\.' | head -1 | cut -d '.' -f 1)
+clang_at_least = $(shell [ $(CLANG_VERSION) -ge $(1) ] && echo true)
+else
+clang_at_least = $(shell echo false)
endif
cppcheck = $(shell printf '$(2)' | $(CC) $(CFLAGS) -E -dM - 2>/dev/null | grep -E $(1))
=====================================
contrib/src/vpx/rules.mak
=====================================
@@ -140,6 +140,14 @@ ifeq ($(ARCH),aarch64)
VPX_LDFLAGS += -arch arm64
endif
endif
+ifdef HAVE_DARWIN_OS
+ifeq ($(ARCH),$(filter $(ARCH), arm aarch64))
+ifneq ($(call clang_at_least, 13), true)
+# arm_neon.h broken on clang 12
+VPX_CONF += --disable-neon-dotprod
+endif
+endif
+endif
ifndef WITH_OPTIMIZATION
VPX_CONF += --disable-optimizations
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/718af4130264591842c665b33e4613975cd29cd7...fc19f61f6c842b7f7fe8f2c96f4198ac10d10c53
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/718af4130264591842c665b33e4613975cd29cd7...fc19f61f6c842b7f7fe8f2c96f4198ac10d10c53
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list