|
| 1 | +# Meson's policy on mixing multiple build systems in one build directory |
| 2 | + |
| 3 | +Meson has been designed with the principle that all dependencies are |
| 4 | +either provided by "the platform" via a mechanism such as Pkg-Config |
| 5 | +or that they are built as Meson subprojects under the main |
| 6 | +project. There are several projects that would like to mix build |
| 7 | +systems, that is, build dependencies in the same build directory as |
| 8 | +the other build system by having one build system call the other. The |
| 9 | +build directories do not necessarily need to be inside each other, but |
| 10 | +that is the common case. |
| 11 | + |
| 12 | +This page lists the Meson project's stance on mixing build |
| 13 | +systems. The tl/dr version is that while we do provide some |
| 14 | +functionality for this use case, it only works for simple |
| 15 | +cases. Anything more complex can not be made reliable and trying to do |
| 16 | +that would burden Meson developers with an effectively infinite |
| 17 | +maintenance burden. Thus these use cases are not guaranteed to work, |
| 18 | +and even if a project using them works today there are no guarantees |
| 19 | +that it will work in any future version. |
| 20 | + |
| 21 | +## The definition of "build system mixing" |
| 22 | + |
| 23 | +For the purposes of this page, mixing build systems means any and all |
| 24 | +mechanisms where one build system uses build artifacts from a |
| 25 | +different build system's build directory in any way. |
| 26 | + |
| 27 | +Note that this definition does not specify what the dependencies are |
| 28 | +and how they are built, only how they are consumed. For example |
| 29 | +suppose you have a standalone dependency library that builds with |
| 30 | +build system X. In this case having Meson call the build system to |
| 31 | +build the dependency at build time would be interpreted as mixing |
| 32 | +build systems. On the other hand a "Flatpak-like" approach of building |
| 33 | +and installing the library with an external mechanism and consuming it |
| 34 | +via a standard build-system agnostic method such as Pkg-Config would |
| 35 | +not be considered build system mixing. Use of uninstalled-pkgconfig |
| 36 | +files is considered mixing, though. |
| 37 | + |
| 38 | +## What does this mean for support and compatibility? |
| 39 | + |
| 40 | +The Meson project will not take on any maintenance burden to ensure |
| 41 | +anything other than the simple builds setups as discussed above will |
| 42 | +work. Nor will we make changes to support these use cases that would |
| 43 | +worsen the user experience of users of plain Meson. This includes, but |
| 44 | +is not limited to, the following: |
| 45 | + |
| 46 | +- Any changes in other build systems that cause mixed project breakage |
| 47 | + will not be considered a bug in Meson. |
| 48 | + |
| 49 | +- Breakages in mixed build projects will not be considered regressions |
| 50 | + and such problems will never be considered release blockers, |
| 51 | + regardless of what the underlying issue is. |
| 52 | + |
| 53 | +- Any use case that would require major changes in Meson to work |
| 54 | + around missing or broken functionality in the other build system is |
| 55 | + not supported. These issues must be fixed upstream. |
0 commit comments