Skip to content

Revert "Packaging: write our own meson crossfile for appleOS"

The contribs already has a way to generate the crossfile.meson file with more features. It also doesn't rewrite the file if it is the same, avoiding rebuilds of all meson-based contribs.

The main difference is the passing of -arch and -sysroot to the compiler. But these are already passed as cflags and used for function tests. For example here is the call to check for clock_gettime() in dav1d using

if cc.has_function('clock_gettime', prefix : '#include <time.h>', args : test_args)

Command line: `/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/.
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/vlc_build/.
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/include/dav1d
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/vlc_build/include/dav1d
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/include
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/contrib-arm64-apple-iOS_9.0/dav1d/vlc_build/include
-I/Volumes/APFS/Programs/Videolabs/vlc/contrib/arm64-iphoneos/include /tmp/tmp4xnfmvv3/testfile.c -E -P
-mios-version-min=9.0 -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS26.0.sdk
-Werror=partial-availability
-fno-stack-check -g -O2 -P -O0 -Werror=implicit-function-declaration -std=c99` -> 0

This reverts commit 47cdb055.

The arch should be implied by cpu or cpu_family we set in [host_machine]. The sysroot could be added but there doesn't seem to be a clean way to do it in meson yet. It might benefit Android as well.

Edited by Steve Lhomme

Merge request reports

Loading