meson icon indicating copy to clipboard operation
meson copied to clipboard

ninjabackend: add -fmodules as a dyndeps condition

Open mochaaP opened this issue 2 months ago • 2 comments

we previously only check for -fmodules-ts.

this could hypothetically be something like Compiler.get_cpp_modules_args for extensibility.

mochaaP avatar Dec 09 '25 21:12 mochaaP

TODO: add a method to the Compiler instance and use it

mochaaP avatar Dec 09 '25 22:12 mochaaP

@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?

dcbaker avatar Dec 18 '25 16:12 dcbaker

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 avatar Jan 27 '26 18:01 mochaaP

@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.

dcbaker avatar Jan 27 '26 22:01 dcbaker