ninjabackend: add -fmodules as a dyndeps condition
we previously only check for -fmodules-ts.
this could hypothetically be something like Compiler.get_cpp_modules_args for extensibility.
TODO: add a method to the Compiler instance and use it
@mochaaP Someone else ran into this in the real world. I'd be inclined to actually merge this as-is and do the compiler thing as a follow up given that situation. This is also suitable for backport to a stable release as is.
Could you rebase and convert to a real PR and then we can follow up on the rest later?
cc @dcbaker this is now implemented.
we should probably expose another interface to select the best flag to enable modules in the interpreter so every project doesn't have to reinvent the wheel.
@mochaaP I agree having an option (probably global that can be per-target via override_options that turns on module support would be better, especially given the wide variety of option names.