When building mac or ios apps, the sysroot is set to the local xcode's directory via an identifier that gets replaced on the fly by bazel. Without this, I see errors like the following when running the clang tidy check:
error: no such sysroot directory: '__BAZEL_XCODE_SDKROOT__' [clang-diagnostic-missing-sysroot]
When building mac or ios apps, the sysroot is set to the local xcode's directory via an identifier that gets replaced on the fly by bazel. Without this, I see errors like the following when running the clang tidy check:
Unfortunately, it seems that this mechanism isn't exposed and from a few searches, I found many rules replicating the logic to discover the sdkroot such as the following: https://github.com/hedronvision/bazel-compile-commands-extractor/blob/204aa593e002cbd177d30f11f54cff3559110bb9/refresh.template.py#L758-L780