meson icon indicating copy to clipboard operation
meson copied to clipboard

backend/ninja: use `generate_basic_compiler_args()` for C#, Java, Swift

Open bgilbert opened this issue 1 year ago • 2 comments

C#, Java, and Swift targets were manually collecting compiler arguments rather than using the helper function for this purpose. This caused each target type to add arguments in a different order, and to forget to add some arguments respectively:

Language Arguments
C# /nologo, -warnaserror
Java warning level (-nowarn, -Xlint:all, -Xdoclint:all), debug arguments (-g, -g:none), -Werror
Swift -warnings-as-errors

Fix this. Also fix up some no-longer-unused argument processing in the Compiler implementations and correct werror options for the Intel Fortran compiler.

Add werror tests for various languages. There isn't a mechanism to declare failing tests using the same language exclusion mechanics as in run_project_tests.py. We could fix this by allowing failing tests in language directories, or by allowing language tests in failing* directories. The former is simpler to implement and allows grouping these tests with related language tests. Support a FAIL file in a test directory which can contain meson, build, or test, signaling that we should expect a test failure in the respective build phase.

Fixes https://github.com/mesonbuild/meson/issues/13059.

bgilbert avatar Apr 11 '24 20:04 bgilbert

Failing CI: https://github.com/mesonbuild/meson/actions/runs/8652628830/job/23725978456?pr=13074#step:4:487

tristan957 avatar Apr 11 '24 20:04 tristan957

Ready for review.

bgilbert avatar Apr 22 '24 01:04 bgilbert

Rebased, deferred the last commit to a followup PR, and dropped the quotes in the get_dependency_compile_args() argument type.

bgilbert avatar Apr 27 '24 09:04 bgilbert

Thanks, looks good!

dcbaker avatar Apr 27 '24 15:04 dcbaker

Tests in #13155.

bgilbert avatar Apr 27 '24 22:04 bgilbert