On 3/21/23 16:25, Daniel P. Berrangé wrote: > On Tue, Mar 21, 2023 at 04:11:33PM +0100, Michal Privoznik wrote: >> <snip/> > > I don't like the idea of forcing -O0 for the production builds, just to > work around the problem of our broken tests. Can we approach it from the > opposite POV and disable building of tests, if we see meson optimization > level is > 0 > > eg something roughly like this: > > with_tests = true > if cc.get_id() == 'clang' and > not supported_cc_flags.contains('-fsemantic-interposition') and > get_option('optimization') != 0 > with_tests = false > endif > > if with_tests > subdir('tests') > endif > > > So people can choose to have tests work or not That could work too, yeah. My reasoning for going with -O0 was that it's very rare that somebody would use such old CLang, but I guess disabling tests is less invasive. I'll send v2 shortly. Michal