The %{cxx} substitution can be quoted with single quotes, which is
fine with unix shells and when executing commands with the lit
internal shell, but breaks when executed directly with subprocess.call()
on Windows.
(The alternative would be to fix the quoting of the subsitution, but
that turns out to be a deeper rabbit hole than expected.)
This also has the side effect of reducing the number of calls to
the compiler, as the hasCompileFlag method is cached.
This unlocks 114 tests that previously were skipped on Windows.
This is a much more straightforward alternative to D103310; it doesn't
address the issue of the way those strings are quoted though, but
avoids that being an issue.
So this is a little bit tricky. The thing is that the test format is used inside the DSL, and I'd like to avoid a chicken-and-egg problem. IOW, I see this as a layering violation - the testing format is intended to be the base most thing that doesn't have any other dependencies except Lit proper.