···18181919Controls the flags passed to `meson setup` during configure phase.
20202121+#### `mesonBuildDir` {#meson-build-dir}
2222+2323+Directory where Meson will put intermediate files.
2424+2525+Setting this can be useful for debugging multiple Meson builds while in the same source directory, for example, when building for different platforms.
2626+Different values for each build will prevent build artefacts from interefering with each other.
2727+This setting has no tangible effect when running the build in a sandboxed derivation.
2828+2929+The default value is `build`.
3030+2131#### `mesonWrapMode` {#meson-wrap-mode}
22322333Which value is passed as
+4-2
pkgs/by-name/me/meson/setup-hook.sh
···33mesonConfigurePhase() {
44 runHook preConfigure
5566+ : ${mesonBuildDir:=build}
77+68 local flagsArray=()
79810 if [ -z "${dontAddPrefix-}" ]; then
···28302931 echoCmd 'mesonConfigurePhase flags' "${flagsArray[@]}"
30323131- meson setup build "${flagsArray[@]}"
3232- cd build || { echoCmd 'mesonConfigurePhase' "could not cd to build"; exit 1; }
3333+ meson setup "$mesonBuildDir" "${flagsArray[@]}"
3434+ cd "$mesonBuildDir" || { echoCmd 'mesonConfigurePhase' "could not cd to $mesonBuildDir"; exit 1; }
33353436 if ! [[ -v enableParallelBuilding ]]; then
3537 enableParallelBuilding=1