Skip to content
Discussion options

You must be logged in to vote

I ended up asking on the Slack at the same time (had no idea both of these would be responded to so quickly!) Here is the solution

aggregate_txt(
    name = "ConditionalAggregate",
    srcs = select({
        ":FileAIncluded": [":FileA"],
        "//conditions:default": [],
    }) + select({
        ":FileBIncluded": [":FileB"],
        "//conditions:default": [],
    }) + select({
        ":FileCIncluded": [":FileC"],
        "//conditions:default": [],
    }),
)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@CuckooEXE
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by CuckooEXE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants