On 2/27/21 11:23 PM, Claudio Fontana wrote: > Hi Paolo, > > I don't know how to handle an issue in the current way we are using meson > with recursion, ie always recursing, > and testing multiple options inside the recursed directory. > > In the case of ARM, we have: > > target/arm/tcg/meson.build, > > where I need to check all the time for TCG, given our current standard of > always recursing. > > Besides being error-prone to always remember to check for CONFIG_TCG, > > how do I add some object conditionally on whether CONFIG_TCG is true, but > TARGET_AARCH64 is false? > > I'd need something like: > > arm_ss.add(when: [!TARGET_AARCH64,'CONFIG_TCG'], if_true: files( > 'tcg-cpu-models.c', > )) > > but the negation !TARGET_AARCH64 is a syntax error... is there any way to > negate the condition?
Funny, I asked Paolo the same question last week on IRC, but: - I also included TARGET_SIZE in the when: - your email is clearer than my questions :) > > Also as we nest directories more and more, it seems to me that this becomes > more and more confusing. > > How about dropping the idea to recurse always unconditionally? > > Thanks! > > Claudio > >
