Skip to content

Commit 673c93e

Browse files
authored
Add note about Meson GCC toolchain to build_tips.md (#1279)
This change adds a note about where to find Meson GCC toolchain files. When I first read this section as-is, I assumed that CMake was the only build system with GCC-specific toolchain files which led to a fruitless effort to make `CC=gcc CXX=g++ meson` work.
1 parent a1e489c commit 673c93e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: docs/src/build_tips.md

+2
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,8 @@ For these target systems Clang is the default compiler, however some programs ma
165165

166166
For programs built with CMake (see the [CMake build](#CMake-builds-1) section) you can use the GCC toolchain file that is in `${CMAKE_TARGET_TOOLCHAIN%.*}_gcc.cmake`.
167167

168+
For programs built with Meson (see the [Meson build](#Meson-builds-1) section) you can use the GCC toolchain file that is in `${MESON_TARGET_TOOLCHAIN%.*}_gcc.meson`.
169+
168170
If the project that you want to build uses the GNU Build System (also known as the Autotools), there isn't an automatic switch to use GCC, but you have to set the appropriate variables. For example, this setting can be used to build most C/C++ programs with GCC for FreeBSD and macOS:
169171
```sh
170172
if [[ "${target}" == *-freebsd* ]] || [[ "${target}" == *-apple-* ]]; then

0 commit comments

Comments
 (0)