https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119758

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain Buclaw <ibuc...@gcc.gnu.org>:

https://gcc.gnu.org/g:8a03d014ec096b3e8c9941a6bf724d3daaeeb289

commit r15-9402-g8a03d014ec096b3e8c9941a6bf724d3daaeeb289
Author: Iain Buclaw <ibuc...@gdcproject.org>
Date:   Sat Apr 12 09:40:24 2025 +0200

    d: Fix -fonly= argument only matches when including full path [PR119758]

    Using `strcmp' to match the `-fonly=' argument with the input source
    file made the feature inflexible to use.  By mistake, the driver was
    also found to omit all other modules on the command line as well, which
    differed from the documentation on the flag:

        Tell the compiler to parse and run semantic analysis on all modules
        on the command line, but only generate code for the given argument.

    New tests added to check the feature, which didn't exist before.

            PR d/119758

    gcc/d/ChangeLog:

            * d-lang.cc (d_parse_file): Use endswith in test for -fonly=
argument.
            * d-spec.cc (lang_specific_driver): Rework -fonly= and pass all
input
            files to the front-end compiler when the option is seen.

    gcc/testsuite/ChangeLog:

            * gdc.dg/driver_fonly1.d: New test.
            * gdc.dg/driver_fonly2.d: New test.
            * gdc.dg/driver_fonly3.d: New test.
            * gdc.dg/imports/fonly.d: New test.

Reply via email to