summaryrefslogtreecommitdiff
path: root/config
AgeCommit message (Collapse)AuthorFilesLines
2022-11-02Use Visual Studio by default for building on WindowsNirbheek Chauhan1-1/+7
When possible, we now build using Visual Studio by default, unless you pass -v mingw. This flips the previous default of using the MinGW toolchain unless you pass -v visualstudio The migration path for users on Windows is to wipe their build-tools prefix and rebuild it. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/991>
2022-09-15Enable Rust plugins on Linux, macOS, MSVCNirbheek Chauhan3-2/+7
Also update the bootstrap step for the Fedora image to download Rust toolchain files for cross-mingw and cross-android, purely for testing purposes. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/915>
2022-09-03Remove Apple Bitcode supportNirbheek Chauhan2-2/+2
Apple has deprecated Bitcode support in XCode 14 with a loud warning asking users to stop using it, and submissions to the App Store now strip bitcode information. Time to just delete all the relevant code. https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes#Deprecations Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/879>
2022-03-30config: rename cross-macos-x86_64 -> x86-64 like all the other config filesMatthew Waters2-2/+2
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/839>
2022-03-04windows: enable parallel builds with MSYS2Andoni Morales Alastruey1-6/+6
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/743>
2022-03-04Add support for MSYS2Andoni Morales Alastruey1-9/+7
This is the initial commit to start supporting MSYS2 (https://www.msys2.org/) in favor of the old MSYS/MinGW. MSYS2 brings several important improvements: * Project with active development * In sync with latest Cygwin * Up-to-date packages * Package manager Here is a more detailed writeup of MSYS2 from Git's migration https://github.com/git/git/commit/df5218b4c30b2fa1ba0d1ada4166ad85bc83be26 The old msys will still be supported to ease the migration but a deprecation warning will be shown to migrate to MSYS2 Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/743>
2021-10-18android: set ANDROID_NDK_HOME instead of ANDROID_NDKJonas Vautherin1-1/+1
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/752>
2021-07-13config/ios: put iphone sdk version minimum into CPPFLAGSMatthew Waters1-4/+6
This may be important for anything produced by the C Preprocesser Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/715>
2021-05-14macos/universal: fix pkg-config packagingMatthew Waters1-0/+5
When building for universal, the build-tools pkg-config is not sufficient as it is not built for the universal archs. We need to build our own version to distribute. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/701>
2021-01-21macOS: fix Objective-C++ cross-compilationAndoni Morales Alastruey1-2/+2
OBJCXXFLAGS are not being set correctly so Objective-C++ files were compiled with the build arch instead of the target one Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/673>
2020-12-07x264: add support for macOS ARM64Andoni Morales Alastruey1-0/+6
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
2020-12-07macos: add new configuration files for macosAndoni Morales Alastruey3-0/+18
When building from Intel we want to cross-compile for ARM64 When building from Apple silicon we want to cross-compile for X86_64 For releases we want universal builds Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
2020-12-07macos: add support for targetting ARM64Andoni Morales Alastruey1-4/+18
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/661>
2020-09-30windows.config: Use MinGW Perl instead of MSYS PerlNirbheek Chauhan1-0/+5
It seems like MSYS Perl sometimes hangs on the Windows CI runners and causes the cerbero build jobs to hang. Maybe the MinGW Perl won't hang because it's not ancient. Some recipes such as autoconf and automake fail to build when using the newer Perl, so continue to use the MSYS perl for those. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/616>
2020-09-21Don't override the 64 bit linker with the 32 bit oneBrent Gardner1-1/+1
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/607>
2020-07-12Add a uwp-universal target to build all uwp arches at onceNirbheek Chauhan3-8/+35
This is identical to how the cross-android-universal target works. Supported UWP arches are: x86, x86_64, arm64. This covers 100% of Windows 10 machines: https://docs.microsoft.com/en-us/windows/msix/package/device-architecture Advantages are the same as Android: 1. Most people will build apps that target multiple (or all) archs 2. Easier to build and ship all arches at once 3. Easier to download two tarballs rather than six Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/551>
2020-07-09config: Don't set prefix for Windows buildsNirbheek Chauhan4-4/+0
We've been doing this since the beginning to ensure correct paths inside various files such as .pc and .la, but we this is not needed anymore for two reasons: 1. We ship pkg-config with --define-prefix enabled 2. MSI supports installing into any location So, always use dirs inside the build/ directory. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/537>
2020-06-08windows.config: Add UWP flags to C++ flags tooNirbheek Chauhan1-0/+1
Really silly oversight. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/497>
2020-05-29config: Remove glib-specific autoconf hacksNirbheek Chauhan2-12/+2
These haven't been used ever since glib was ported to Meson: glib_cv_stack_grows is now set as a cross property glib_cv_uscore is correctly detected with meson getpwuid_r is correctly detected with meson getgrgid_r is correctly detected with meson wchar_t is available and things work fine (added in 2013, no notes) _NSGetEnviron is fixed in the previous commit Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/489>
2020-05-26cerbero/genlib: Reuse msvc env found at startupNirbheek Chauhan1-16/+27
Since Visual Studio is optional now, this patch is non-trivial. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-05-26Rewrite MSVC/MinGW toolchain config for UWP cross compilationNirbheek Chauhan2-122/+147
Unlike any other platform, on Windows we build recipes with both MSVC and MinGW. All Meson recipes can be built with MSVC, but the Autotools recipes always use MinGW. This broke the fundamental assumption that `self.config.config_env` contains all the information needed by the build system to find the toolchain that we want to use. At the time, we hacked around it by unsetting MinGW toolchain env vars inside `build.py`, and storing msvc toolchain env vars in `self.config.msvc_toolchain_env`. We would then set those only when building recipes that can use MSVC. This completely breaks down when you want to cross-compile on Windows, because we need some env vars to stay in the env, and others to only be in the cross file. To fix this, a bunch of things had to change: 1. Use actual objects for environment variable values: `EnvValue` and other classes that inherit from it. These allow easier merging/overriding of env var values. 2. Separate out env vars according to their stated purpose: a) Configuration for build tools (WINEPREFIX, WINDEBUG, etc) b) Configuration for toolchain (LIBRARY_PATH, INCLUDE, LIB, etc) c) Configuration for build system (CC, CFLAGS, ac_cv_*, etc) 3. Always use a native-file or a cross-file for selecting the toolchain when using Meson. 4. Rename meson_cross_properties to meson_properties, since we use those even when not cross-compiling. Future TODO: port all env var usage in config.py and config/*.config to the new EnvValue* objects Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-05-26cerbero: Refactor variant handling in platform config filesNirbheek Chauhan12-43/+24
While parsing config files such as the platform config files, we were exposing variants as an unresolved `list` of "operations" that will enable or disable the variant once they've all been resolved This is buggy because it means that platform config files have no way to know whether a variant has actually been disabled or enabled by the user. Now we always parse variants into the `Variants` object before parsing all configuration files. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-05-26cerbero: Add configs to cross-compile on Windows to ARM/ARM64Nirbheek Chauhan2-0/+6
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-05-26cerbero: Add a variant for the Universal Windows PlatformNirbheek Chauhan1-3/+21
When building with 'uwp' enabled, recipes that can be built with MSVC will be built for the Universal Windows Platform. Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-05-26cerbero: Allow fetching UWP Visual Studio env varsNirbheek Chauhan1-1/+2
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/480>
2020-04-18cerbero/windows: Don't require visual studio for genlibNirbheek Chauhan1-1/+2
We don't actually require Visual Studio if you don't enable the variant.
2020-04-06android: update to NDK r21Matthew Waters1-6/+27
2020-04-03cerbero: Add a new variant for optimizationNirbheek Chauhan5-11/+11
Now you can pass `-v debug,nooptimization` and it will be the same as passing `-Dbuildtype=debug` or `-Doptimization=0 -Ddebug=true` to Meson. Same also applies to non-Meson recipes: `-O2`/`-Os` will be passed if `optimization` is enabled. If not, `-Og` is passed if `debug` is enabled, else `-O0` is passed. This requires revamping how optimization and debug args are added to compiler flags via env vars. Earlier we used to add them in the platform-specific config, but this was duplicated across all configs and was incorrect for Meson recipes. Note that Meson recipes should not be using `get_option('buildtype')` in the build files to check if debugging is enabled because that will return `custom` for most combinations of `optimization` and `debug. See: https://mesonbuild.com/Builtin-options.html#core-options
2020-04-01config/darwin: don't symlink gl headersMatthew Waters1-13/+0
It's not necessary anymore
2020-03-04windows.config: Place temporary wine files in var/tmpNirbheek Chauhan1-1/+3
This is a more obvious place for it, and is self-documenting in the CI YAML too, where we exclude it from the cerbero-deps tarball.
2020-03-04cerbero/windows: Don't try to use objc/objc++ compilersNirbheek Chauhan1-0/+7
Meson 0.53 can correctly detect MinGW objc/objc++ compilers, which means that if you follow our instructions and install MSYS/MinGW, you will have those available, which will be found by Meson. This has the unintended side-effect that Meson will then use the objc++ compiler to find libraries that it's searching for in `dependency()` calls, since it has higher priority than the C++ compiler (which is MSVC++ in our case). So Meson will end up preferring `libfoo.dll.a` over `foo.lib` when looking for import libraries. Unfortunately, some of those are malformed (such as `libssl.dll.a` and `libcrypto.dll.a`) and the DLLs will fail to load some symbols at runtime, such as `DTLS_method`. Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/246 To fix the duplication in the outer env and in the MSVC env, we will need to completely switch over to using `mingw_toolchain_env` for the MinGW/GCC environment so that we don't need to wipe the outer env when building MSVC recipes.
2020-03-03Don't show wine 'fixme' logs when calling Wix installerLoïc Le Page1-0/+1
2020-02-25cerbero/config: Avoid using env vars for compiler pathsNirbheek Chauhan1-4/+8
If we pass only some compiler system include paths using env vars, the order will be incorrect, and Meson will remove any `-isystem` args we add ourselves to force a particular order if they're also in the env var (which adds it to the default compiler search path). This will break glib's search for iconv.h on cross-android. If we always pass the correct list of system include directories using the env var, cross compilation breaks because some autotools recipes call the native (non-cross) compiler with the same env, and it will pick up the wrong headers causing a build failure; f.ex., gmp on cross-android. The only solution is to never pass these args when cross compiling, and to always pass it using the CFLAGS, CPPFLAGS, etc env vars.
2020-02-25windows.config: Bump requirement to Windows 7Nirbheek Chauhan1-1/+1
Windows Vista has been out of support for a very long time, and almost no one uses it anyway. We need this to build the latest Ninja (1.10).
2020-02-24cerbero: Allow specifying a custom location for Visual StudioNirbheek Chauhan1-1/+1
Sometimes Visual Studio is installed into a custom location, or the user wants to specifically select a particular Visual Studio installation when there are many installed. You can set the `vs_install_path` and `vs_install_version` config variables to override the automatic detection of the Visual Studio installation location. F.ex., in `~/.cerbero/cerbero.cbc` This is needed for running Cerbero on the Windows CI, where we use Visual Studio Build Tools 2019 installed in `C:\BuildTools`.
2020-02-22cerbero/shell: Unbreak visualstudio shellNirbheek Chauhan1-1/+1
This broke while moving from using a global env to a per-recipe env.
2020-02-03cerbero: Move from deprecated check_call to check_outputNirbheek Chauhan1-1/+1
Needed a new `fail` kwarg to check_output for cases where we want the output of the command regardless of returncode. Also fix a few minor bugs around newline handling and quoting along the way.
2019-12-16config: Cosmetic whitespace fixesNirbheek Chauhan1-17/+17
Keep a space around `=`, following PEP8.
2019-12-16cerbero/genlib: Define gendef in windows.configNirbheek Chauhan1-0/+1
Same as dlltool, this should not be hard-coded.
2019-12-16windows.config: Avoid leading spaces in LDFLAGSNirbheek Chauhan1-11/+17
Same fix as 78f06dd405c168000ac2afae287926571aae122e, this time for 32-bit builds. In the process, also reworked `cmd()` to support arguments and wrappers to avoid having to add extra spaces at the start and end of arguments and command wrappers.
2019-12-04ios: Bump minimum target SDK to iOS 11.0Matthew Waters5-18/+1
According to https://david-smith.org/iosversionstats/ iOS 10 is used by <2% of devices. iOS allows us to use IOSurface unconditionally which has numerous advantages for decoder zerocopy interaction. Especially with OpenGL Metal/Vulkan Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/214
2019-11-23linux.config: add workaround_ldflagsIlya Smelykh1-1/+3
Fixes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/182
2019-11-14macos/ios: expose objc++ compilers in env variablesMatthew Waters2-0/+3
Otherwise build systems cannot use them correctly
2019-11-11android: add support for vulkanMatthew Waters1-1/+2
2019-10-15config/android: place our build directory before the toolchain'sMatthew Waters1-1/+1
We will be providing overriden libraries (mostly newer) that should be used over the toolchain libraries.
2019-10-02config/ios: generate DistroVersion's automaticallyMatthew Waters1-28/+30
The iOS versions aren't really used for feature checks/hacks so having each and every iOS version in a list is not entirely useful. Especially when that list is almost always out of date.
2019-09-17darwin.config: Bump required macOS SDK version to 10.11Nirbheek Chauhan1-1/+1
This is El Capitan, which was released 4 years ago. We do not support old versions of macOS anyway, and the marketshare for OS X 10.10 is 5% of the total macOS marketshare according to https://gs.statcounter.com/os-version-market-share/macos/desktop/worldwide We need this to fix a build error with GnuTLS 3.6.9 related to _connectx not being available in 10.10: https://gitlab.freedesktop.org/gstreamer/cerbero/merge_requests/252//commits#macos
2019-09-17ios.config: Bump target iOS SDK version to 10.0Nirbheek Chauhan1-1/+1
We need this for C11 thread-local-storage support, which is needed by GnuTLS 3.6.9.
2019-09-17ios.config: Add enums for iOS SDK versions up to 12.4Nirbheek Chauhan1-0/+2
2019-09-15config/*: Don't assume that the toolchain existsNirbheek Chauhan2-19/+11
Now when we run bootstrap for the first time, the config is generated once on startup, and then reused for all recipes. The toolchain does not exist at that time.