Skip to content

meson: Define cpp_std in the top-level project()

Due to a bug, meson ignores ${lang}_std settings in default_options for subprojects: https://github.com/mesonbuild/meson/issues/1889

This causes build failures when a subproject requires c++11 or c++14, etc. Compilers that support those cpp_stds are very common, and all the toolchains that we support include c++ compilers, so we can add cpp_std=c++14 to the top-level.

This fixes the webrtc-audio-processing build on Linux, and harfbuzz on macOS.

Actually, the webrtc-audio-processing build still fails while linking subprojects/webrtc-audio-processing/webrtc/modules/audio_coding/libwebrtc-audio-coding-1.so.1, but that looks like a different bug:

/usr/bin/ld: subprojects/webrtc-audio-processing/webrtc/system_wrappers/libsystem_wrappers.a.p/source_field_trial.cc.o: in function `webrtc::field_trial::(anonymous namespace)::FieldTrialsStringIsValidInternal(absl::lts_2020_09_23::string_view)':
/home/nirbheek/projects/repos/gstreamer/_build/../subprojects/webrtc-audio-processing/webrtc/system_wrappers/source/field_trial.cc:47: undefined reference to `absl::lts_2020_09_23::string_view::find(char, unsigned long) const'
/usr/bin/ld: /home/nirbheek/projects/repos/gstreamer/_build/../subprojects/webrtc-audio-processing/webrtc/system_wrappers/source/field_trial.cc:51: undefined reference to `absl::lts_2020_09_23::string_view::find(char, unsigned long) const'

Merge request reports