Skip to content

Conversation

@keith
Copy link
Member

@keith keith commented Dec 19, 2025

This new attribute solves one of the longstanding annoyances with
private include paths for third party projects. Today users often
hardcode -Iexternal/something or come up with some complicated
workarounds with custom rules vending make variables or
implementation_deps

This attribute is named after, and has the same semantics, as defines
vs local_defines. These paths are only used in the context of the rule
that they are on.

Fixes bazelbuild/bazel#16472
Fixes bazelbuild/bazel#24144

@fmeum
Copy link
Collaborator

fmeum commented Dec 26, 2025

This also fixes bazelbuild/bazel#24144

This new attribute solves one of the longstanding annoyances with
private include paths for third party projects. Today users often
hardcode `-Iexternal/something` or come up with some complicated
workarounds with custom rules vending make variables or
`implementation_deps`

This attribute is named after, and has the same semantics, as `defines`
vs `local_defines`. These paths are only used in the context of the rule
that they are on.

Fixes bazelbuild/bazel#16472
@keith keith force-pushed the ks/add-local_includes-to-cc_library-cc_binary branch from c73a1a1 to d15285f Compare January 5, 2026 23:47
@keith
Copy link
Member Author

keith commented Jan 7, 2026

i need to disable this on ci on older bazel verisons, might be easier with #560

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.

Add Make variable for target package source dir Feature Request: local_includes for cc_library, making an easy path for good cross-platform hygiene

2 participants