summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2023-07-12 12:55:56 -0700
committerGitHub <noreply@github.com>2023-07-12 14:55:56 -0500
commit8a53452cad51f30eb41ee7c7d7bff3ac727fb6a7 (patch)
treec9a162c874a9c47b3fe03578ce6a78d5db4b6cce
parentadee12a6f062b4b0d0a010448b6cc51210b946e5 (diff)
downloadbazelbuild-apple_support-8a53452cad51f30eb41ee7c7d7bff3ac727fb6a7.tar.gz
Add ~/Applications to allowed include directories (#229)
Assume that if this directory matters for this it's because the user has installed Xcode into ~/Applications. If you need anything outside of these defaults otherwise you have to use `BAZEL_ALLOW_NON_APPLICATIONS_XCODE` as mentioned in the readme.
-rw-r--r--crosstool/osx_cc_configure.bzl5
1 files changed, 4 insertions, 1 deletions
diff --git a/crosstool/osx_cc_configure.bzl b/crosstool/osx_cc_configure.bzl
index 23c3ff4..3b9678a 100644
--- a/crosstool/osx_cc_configure.bzl
+++ b/crosstool/osx_cc_configure.bzl
@@ -38,7 +38,10 @@ def _get_escaped_xcode_cxx_inc_directories(repository_ctx, xcode_toolchains):
user = repository_ctx.os.environ.get("USER")
if user:
- include_dirs.append("/Users/{}/Library/".format(user))
+ include_dirs.extend([
+ "/Users/{}/Applications/".format(user),
+ "/Users/{}/Library/".format(user),
+ ])
# Include extra Xcode paths in case they're installed on other volumes
for toolchain in xcode_toolchains: