Don't enable unity builds by default

But do suggest enabling them in the readme and enable them on the CI.
Having them enabled by default breaks clangd/ccls, which doesn't sound
like a great idea.

https://github.com/mesonbuild/meson/issues/8146
This commit is contained in:
Robbert van der Helm
2021-01-01 22:52:17 +01:00
parent 7c133e18da
commit 872a6aa304
4 changed files with 7 additions and 12 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ jobs:
# Statically link to libstdc++ on Ubuntu 18.04 as we're compiling # Statically link to libstdc++ on Ubuntu 18.04 as we're compiling
# with a newer version of g++ than what's in the default repos # with a newer version of g++ than what's in the default repos
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Dwith-bitbridge=true -Dcpp_link_args='-static-libstdc++' -Dbuild.cpp_link_args='-static-libstdc++' build meson setup --buildtype=release --cross-file=cross-wine.conf --unity=on --unity_size=10000 -Dwith-static-boost=true -Dwith-bitbridge=true -Dcpp_link_args='-static-libstdc++' -Dbuild.cpp_link_args='-static-libstdc++' build
ninja -C build ninja -C build
- name: Create an archive for the binaries - name: Create an archive for the binaries
run: | run: |
@@ -87,7 +87,7 @@ jobs:
mkdir -p /tmp/prefix mkdir -p /tmp/prefix
export WINEPREFIX=/tmp/prefix export WINEPREFIX=/tmp/prefix
meson setup --buildtype=release --cross-file cross-wine.conf -Dwith-static-boost=true -Dwith-bitbridge=true build meson setup --buildtype=release --cross-file=cross-wine.conf --unity=on --unity_size=10000 -Dwith-static-boost=true -Dwith-bitbridge=true build
ninja -C build ninja -C build
- name: Create an archive for the binaries - name: Create an archive for the binaries
run: | run: |
-5
View File
@@ -53,11 +53,6 @@ TODO: Add an updated screenshot with some fancy VST3-only plugins to the readme
and up. The build process now detect which version of Wine is used to build and up. The build process now detect which version of Wine is used to build
with, and it then applies the change conditionally to be able to support with, and it then applies the change conditionally to be able to support
building with both older and newer versions of Wine. building with both older and newer versions of Wine.
- [Unity builds](https://mesonbuild.com/Unity-builds.html) with 4-file units are
now enabled by default since all the source code additions for VST3 support
increased build times significantly. The unit size can be changed at build
time using the `unity_size` option, and this behaviour can be disabled
completely by passing `unity=off`.
### Fixed ### Fixed
+5 -2
View File
@@ -555,10 +555,13 @@ The following dependencies are included in the repository as a Meson wrap:
some [patches](https://github.com/robbert-vdh/yabridge/blob/master/tools/patch-vst3-sdk.sh) some [patches](https://github.com/robbert-vdh/yabridge/blob/master/tools/patch-vst3-sdk.sh)
to allow Winelib compilation to allow Winelib compilation
The project can then be compiled as follows: The project can then be compiled with the command below. You can remove or
change the unity size argument if building takes up too much RAM, or you can
disable unity builds completely by getting rid of `--unity=on` at the cost of
slightly longer build times.
```shell ```shell
meson setup --buildtype=release --cross-file cross-wine.conf build meson setup --buildtype=release --cross-file cross-wine.conf --unity=on --unity-size=1000 build
ninja -C build ninja -C build
``` ```
-3
View File
@@ -8,9 +8,6 @@ project(
# Even though Meson will complain that this option does not exist, without # Even though Meson will complain that this option does not exist, without
# this Meson will not apply the above option to native targets # this Meson will not apply the above option to native targets
'build.cpp_std=c++2a', 'build.cpp_std=c++2a',
# Enable Unity builds with the default 4-file units to somewhat speed up the
# compilation process
'unity=on',
], ],
) )