The group() target documents that it takes inputs and sources, but ignores them?

6 views
Skip to first unread message

Aaron Wood

unread,
Oct 10, 2025, 3:29:12 PM (6 days ago) Oct 10
to gn-dev
The documentation for the group() target documents that it takes all the general target variables, including `inputs` and `sources`, yet AFAICT, ignores them completely (but they get marked as used, so they don't trigger the unused variable error).

Is this a long-standing bug, or an intentional behavior?  Or a now-intentional behavior because it's a long-standing bug and fixing it would break users?

Thanks,
Aaron

Dirk Pranke

unread,
Oct 10, 2025, 3:57:48 PM (6 days ago) Oct 10
to Aaron Wood, gn-dev
I'm not sure, but I think there are cases where you want to use group() as a kind of fake or dummy target that doesn't do anything, and in this case you want those variables to have the behavior they do. 

But I could be misremembering or projecting :).

-- Dirk

Aaron Wood

unread,
Oct 10, 2025, 5:05:17 PM (6 days ago) Oct 10
to Dirk Pranke, gn-dev
The way we handle that in the Fuchsia build is we just make a group(), and don't forward those variables, and then mark them not_needed().  Such as our templates that try to "automatically" change toolchains with a group, and then define the "actual" target in a different toolchain than the template was first instantiated in.
Reply all
Reply to author
Forward
0 new messages