This is probably the last work I'm going to do here for a while. I still see some room for improvement, but I think after this patch:
a) refactor begins to have diminishing returns
b) There's a sufficient amount of sharing and re-use to validate the design
c) There's enough specific examples of how to use this that other projects (e.g. compiler-rt, etc) can use those as a model of how to simplify their own configs.
In other words, I'm not brave enough to touch compiler-rt's config files :)
There's some minor changes in the config api that increase flexibility in how you override environment variables and spawn an external llvm-config, but otherwise this is mostly just deleting code.
Minor nit: it seems reasonable enough to name this parameter:
(I don't think that's a problem for ShTest.init, and has the benefit of failing if the parameter name changes. Imagine if someone added another default-valued bool argument to ShTest.__init__...)