On 10/3/20 11:48 AM, Richard Henderson wrote:
> On 9/29/20 5:43 PM, Philippe Mathieu-Daudé wrote:
>> +arm_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('m_helper.c'), if_false:
>> files('m_helper-stub.c'))
>> +
>> arm_ss.add(zlib)
>>
>> arm_ss.add(when: 'CONFIG_TCG', if_true: files('arm-semi.c'))
>> +arm_ss.add(when: 'CONFIG_TCG', if_false: files('m_helper-stub.c'))
>
> I'm a bit surprised about adding the file twice.
> Since ARM_V7M depends on TCG, isn't the second line redundant?
This does:
if TCG
if CONFIG_ARM_V7M
files('m_helper.c')
else #!V7M
files('m_helper-stub.c'))
endif
else #!TCG
files('m_helper-stub.c'))
endif
So:
if !TCG or !V7M
files('m_helper-stub.c'))
else
files('m_helper.c')
endif
There might be a better way to express that in Meson...
I only understood how to do AND with arrays, but not OR.
Paolo/Marc-André, is it possible?
Thanks,
Phil.