0c6e455961
This extends our ifdef/ifndef test attributes to support more complicated logic expressions. So far we haven't really needed this (ifdef/ifndef accepts an implicitly anded list, which has covered everything so far), but I realized there's a simple trick to make this work. For example, in test.toml: ifdef = 'A && !(B || C)' Generated ifdef: #if (defined(A) && !(defined(B) || defined(C))) This doesn't require complex parsing or anything, just a simple regex: s/[a-zA-Z_0-9]\+/defined(&)/g Is using #if defined(A) everywhere instead of #ifdef A more expensive for the compiler? Not sure. But it seems like we're heavily dominated by the single-threaded link time, so I'm not sure we care.