backend/ninja: use `generate_basic_compiler_args()` for C#, Java, Swift
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.
Failing CI: https://github.com/mesonbuild/meson/actions/runs/8652628830/job/23725978456?pr=13074#step:4:487
Ready for review.
Rebased, deferred the last commit to a followup PR, and dropped the quotes in the get_dependency_compile_args() argument type.
Thanks, looks good!
Tests in #13155.