In common.opt, we read: ... -target-help Common Driver Alias for --help=target. ... But that doesn't seem to be correct, I get different results. For instance, for nvptx target, we have an malias that atm is undocumented, and we have: ... $ cc1 --target-help 2>&1 | grep malias $ ... and: ... $ cc1 --help=target 2>&1 | grep malias -malias [disabled] $...
You are right, I can take a look.
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>: https://gcc.gnu.org/g:717b2d4191e80dc8aae3847675de73ed3f611fb7 commit r12-8026-g717b2d4191e80dc8aae3847675de73ed3f611fb7 Author: Martin Liska <mliska@suse.cz> Date: Thu Mar 31 08:45:58 2022 +0200 --target-help: align with --help=target PR driver/105096 gcc/ChangeLog: * common.opt: Document properly based on what it does. * gcc.cc (display_help): Unify with what we have in common.opt. * opts.cc (common_handle_option): Do not print undocumented options.
Fixed on master, not planning to do a backport.