-
Notifications
You must be signed in to change notification settings - Fork 63
Description
Like other PRs before this one, #1719 brings the topic of compiler support (and then, compiler features and compatibility):
As @VReaperV said in that comment:
trying to support a large zoo of compiler versions is an issue in itself.
I like the ability to build on various compiler families (MSVC, GCC, Clang, etc.), as they may report very different kind of issues. I actually have a Zoo of compilers I test building the engine with (and running the build), which I find interesting and useful in many aspects.
But what I'm far less concerned about are compiler versions. I don't really mind about supporting GCC 10 if we can run GCC 14, or supporting Clang 13 if we can run Clang 20… A couple of compiler versions from a lineage is useful when checking for regressions, but otherwise, I'm less concerned about the versions.
Also, I would like to be able to use the latest compiler tech to build our releases, when possible. One motivation is optimization. Not only newer compilers may have implemented more builtin optimizations, but for example I know that our current build of turbojpeg for the arm64 build is skipping some NEON code because the compiler in old-old-stable Debian is too old.
I have an effort to migrate our release build environment to Debian old-stable, that will bring a newer compiler. Linux is annoying in the fact you cannot target a specific libc version when compiling, so to target an old libc version, you usually build on an obsolete distribution.
As soon as we can install a newer compiler on an old distro for that libc trick when building a game release, I believe we don't have to support the stock compiler, because what we want is the old libc, not the old compiler.
What is important is that people can build the game on the current stable distributions by relying on the stock compiler.
I see those options:
- For Linux release builds, we can build on old stable Debian using Clang from apt.llvm.org, this always brings the latest stable clang (currently Clang 20), in fact they even provide it for the old-old-stable Debian.
- For Windows release builds, our only option is MinGW, which is GCC, which has no backports unlike Clang. But then, the Linux libc of the distribution running MinGW has no importance at all, so we can use the Debian stable to build Windows releases, or even more recent Debian-like distros like Ubuntu, and get a more recent MinGW.
- For macOS, AppleClang makes possible to target an old mac libc even when building on the latest macOS with the latest AppleClang, but our current Darling-based docker build is using an old XCode.
There is a similar topic about CMake versions to support, but CMake provides downloadable builds for Linux (usable for Linux and MinGW builds) and for macOS, our Darling-based docker build already uses some downloaded CMake this way (but not the latest because of Darling compatibility).
I don't mind having our docker release script running the latest CMake and the latest Clang on an old-stable or even an old-old-stable distribution, and raising both cmake and compiler requirements, as long as current stable and LTS distributions can build the game out of the box.
I remind we have an ongoing effort to upgrade our NaCl compiler from PNaCl 3.6 to Saigo Clang 20, so once it's done we would be able to massively bump our required C++ versions and other things and get new toys (and forget about the past).