Skip to content

Add annotation_selects tag class#3541

Merged
illicitonion merged 3 commits intobazelbuild:mainfrom
finn-ball:finn/annotation-select
Sep 16, 2025
Merged

Add annotation_selects tag class#3541
illicitonion merged 3 commits intobazelbuild:mainfrom
finn-ball:finn/annotation-select

Conversation

@finn-ball
Copy link
Copy Markdown
Contributor

@finn-ball finn-ball commented Aug 4, 2025

Adds an annotation_select tag class.

This annotation will add common environment variables:

crate.annotation(
    crate = "foo",
    build_scipt_data = [
        "@bar",
    ],
    build_script_env = {
        "BAR": "bar",
    },
)

This annotation will append a platform dependent select statement to the above variables:

crate.annotation_select(
    crate = "foo",
    triples = ["x86_64-unknown-linux-gnu"],
    build_script_data = [
        "@baz",
    ],
    build_script_env = {
        "BAZ": "baz",
    },
)

Attempts to improve #3511

Copy link
Copy Markdown
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay here!

LGTM - can you patch in (or otherwise achieve) illicitonion@1e5a5ac to error rather than override on duplicate triple setting?

@illicitonion illicitonion added this pull request to the merge queue Sep 16, 2025
Merged via the queue into bazelbuild:main with commit 882bd59 Sep 16, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants