Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/os_comp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,25 @@ jobs:
update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix

./run_tests.py $RUN_TESTS_ARGS -- $MESON_ARGS

check-toolchain-and-convert:
name: 'Check toolchain and build system conversion'
runs-on: ubuntu-latest
container:
image: mesonbuild/ubuntu-rolling

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run check-toolchain unit tests
shell: bash
run: |
source /ci/env_vars.sh
python3 run_unittests.py CheckToolchainTests

- name: Run convert unit tests
shell: bash
run: |
source /ci/env_vars.sh
python3 run_unittests.py ConvertTests
65 changes: 65 additions & 0 deletions docs/markdown/Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,71 @@ Optional arguments. The most common workflow is to run
For the full list of all available options for a specific command use
the following syntax: `meson COMMAND --help`

### check-toolchain

{{ check-toolchain_usage.inc }}

Check the properties of the specified toolchain and sysroot.
The output is displayed as a TOML file.

The checked properties are an amalgamation of checks performed
by popular Meson-based projects. Users are encouraged to
upstream properties of interest.

{{ check-toolchain_arguments.inc }}

#### Examples:

Check the properties of the default system toolchain.

```
meson check-toolchain
```

Check the properties with a cross-file specified toolchain.

```
meson check-toolchain --cross-file CROSS_FILE
```

Check the properties of Android NDK toolchains.

```
meson check-toolchain --android-ndk-path PATH_TO_ANDROID_NDK
```

### convert

{{ convert_usage.inc }}

Converts the meson project to an another build system. The input
are a series of TOML files, and the output are files in the target
build system. Soong and Bazel are supported to varying degrees.

Meson maintains reference TOML files for certain hermetic trees
and projects, and users are encouraged to upstream their use
cases.

{{ convert_arguments.inc }}

#### Examples:

Convert Mesa3D to Soong using reference TOML files.

```
meson convert android aosp_mesa3d
```

Power user maintains own TOML for their hermetic project.

```
meson convert --config=/path/to/myproject.toml \
--project-dir=/path/to/my/target_repo
--toolchain=/path/to/mytoolchain.toml \
--dependencies=/path/to/mydeps.toml
--output_dir=/path/to/output-dir
```

### configure

{{ configure_usage.inc }}
Expand Down
12 changes: 7 additions & 5 deletions mesonbuild/backend/nonebackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ def generate(self, capture: bool = False, vslite_ctx: T.Optional[T.Dict] = None)
if vslite_ctx:
raise MesonBugException('We do not expect the none backend to be given a valid \'vslite_ctx\'')

if self.build.get_targets():
raise MesonBugException('None backend cannot generate target rules, but should have failed earlier.')
mlog.log('Generating simple install-only backend')
self.serialize_tests()
self.create_install_data_files()
# The `meson convert` tool generates build targets, but uses the none backend
# The below clause covers the non-convert use cases of the none backend, when
# build targets are not generated.
if not self.build.get_targets():
mlog.log('Generating simple install-only backend')
self.serialize_tests()
self.create_install_data_files()
2 changes: 2 additions & 0 deletions mesonbuild/check_toolchain/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2026 The Meson Authors
Loading
Loading