build-systems


目录

The build system is the primary way for both developers and system integrators to interact with the Git project. As such, being easy to use and extend for those who are not directly developing Git itself is just as important as other requirements we have on any potential build system.

This document outlines the different requirements that we have for the build system and then compares available build systems using these criteria.

Requirements

The following subsections present a list of requirements that we have for any potential build system. Sections are sorted by decreasing priority.

Platform support

The build system must have support for all of our platforms that we continually test against as outlined by our platform support policy. These platforms are:

Furthermore, the build system should have support for the following platforms that generally have somebody running test pipelines against regularly:

The platforms which must be supported by the tool should be aligned with our platform support policy (see platform-support.adoc).

Auto-detection of supported features

The build system must support auto-detection of features which are or aren’t available on the current platform. Platform maintainers should not be required to manually configure the complete build.

Auto-detection of the following items is considered to be important:

Ease of use

The build system should be both easy to use and easy to extend. While this is naturally a subjective metric it is likely not controversial to say that some build systems are considerably harder to use than others.

IDE support

The build system should integrate with well-known IDEs. Well-known IDEs include:

There are four levels of support:

Native integration is preferable, but integration via either a plugin or by generating a project description via the build system are considered feasible alternatives.

Another important distinction is the level of integration. There are two features that one generally wants to have:

The first bullet point is the bare minimum, but is not sufficient to be considered proper integration.

Out-of-tree builds

The build system should support out-of-tree builds. Out-of-tree builds allow a developer to configure multiple different build directories with different configuration, e.g. one "debug" build and one "release" build.

Cross-platform builds

The build system should support cross-platform builds, e.g. building for arm on an x86-64 host.

Language support

The following languages and toolchains are of relevance and should be supported by the build system:

Built-in support for the respective languages is preferred over support that needs to be wired up manually to avoid unnecessary complexity. Native support includes the following features:

Test integration

It should be possible to integrate tests into the build system such that it is possible to build and test Git within the build system. Features which are nice to have:

Comparison

The following list of build systems are considered:

GNU Make

autoconf

CMake

Meson


版本号 #2
由 壳壳虫 创建于 2026-10-31 20:16:19 UTC
由 壳壳虫 更新于 2026-10-31 20:16:20 UTC