feat(cc toolchain): support external_include_paths on macos
The external_include_paths feature enables specifying include paths locally with -I and with -isystem when the project is included as an external repo.
This makes it possible to set -Werror against your own headers for development without propagating this to consumers of your libraries.
For some reason this was only previously enabled on linux. I do not see a reason for not also enabling it on macos.
Cc @keith
interesting. this doesn't exist in the apple_support toolchain today either. what ends up propagating things as external headers?
interesting. this doesn't exist in the apple_support toolchain today either. what ends up propagating things as external headers?
It works with strip_include_prefix and friends.
So you use that^ to specify include paths and locally they get compiled with -I and - when that feature is enabled in a consuming repo - they get compiled with -isystem.
Using the includes attribute only sets -isystem by default which ignores whatever compiler/linter warnings you've set up.
also added this here: https://github.com/bazelbuild/apple_support/pull/327
@bazel-io flag
@bazel-io fork 7.2.0