[vlc-commits] [Git][videolan/vlc][3.0.x] 2 commits: contrib: add a macro to check the minimum clang version

Steve Lhomme (@robUx4) gitlab at videolan.org
Tue Sep 16 08:56:42 UTC 2025



Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC


Commits:
71b5a8e0 by Steve Lhomme at 2025-09-16T07:17:16+00:00
contrib: add a macro to check the minimum clang version

- - - - -
1e42a948 by Steve Lhomme at 2025-09-16T07:17:16+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
=====================================
@@ -171,6 +171,10 @@ endif
 
 ifneq ($(findstring clang, $(shell $(CC) --version)),)
 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 $(CC) $(CFLAGS) -E -dM - < /dev/null | grep -E $(1))


=====================================
contrib/src/vpx/rules.mak
=====================================
@@ -150,6 +150,12 @@ endif
 VPX_LDFLAGS := -L$(IOS_SDK)/usr/lib -isysroot $(IOS_SDK) $(LDFLAGS)
 endif
 ifdef HAVE_MACOSX
+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
 VPX_LDFLAGS := -L$(MACOSX_SDK)/usr/lib -isysroot $(MACOSX_SDK) -mmacosx-version-min=10.7
 endif
 VPX_LDFLAGS += -arch $(PLATFORM_SHORT_ARCH)



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd71ad62d9564205ce5deeeb4b5b214ab4895234...1e42a94883e4df237fa737573111f35e0c3f4c68

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/cd71ad62d9564205ce5deeeb4b5b214ab4895234...1e42a94883e4df237fa737573111f35e0c3f4c68
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