From 872a6aa304cd532bc78030e769ea5eb026dfd41b Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Fri, 1 Jan 2021 22:52:17 +0100 Subject: [PATCH] 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 --- .github/workflows/build.yml | 4 ++-- CHANGELOG.md | 5 ----- README.md | 7 +++++-- meson.build | 3 --- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9890cde6..ca2af4c4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -48,7 +48,7 @@ jobs: # 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 - 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 - name: Create an archive for the binaries run: | @@ -87,7 +87,7 @@ jobs: mkdir -p /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 - name: Create an archive for the binaries run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index df19c670..ded007a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 with, and it then applies the change conditionally to be able to support 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 diff --git a/README.md b/README.md index 4b83138a..fde91b80 100644 --- a/README.md +++ b/README.md @@ -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) 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 -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 ``` diff --git a/meson.build b/meson.build index 0db531c5..ca0a5dbd 100644 --- a/meson.build +++ b/meson.build @@ -8,9 +8,6 @@ project( # Even though Meson will complain that this option does not exist, without # this Meson will not apply the above option to native targets 'build.cpp_std=c++2a', - # Enable Unity builds with the default 4-file units to somewhat speed up the - # compilation process - 'unity=on', ], )