Skip to content

Commit 2ce1812

Browse files
committed
Consider DEVELOPER_DIR when building wrapped_clang
1 parent 1387594 commit 2ce1812

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

tools/cpp/cc_configure.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ cc_autoconf = repository_rule(
165165
"CC_CONFIGURE_DEBUG",
166166
"CC_TOOLCHAIN_NAME",
167167
"CPLUS_INCLUDE_PATH",
168+
"DEVELOPER_DIR",
168169
"GCOV",
169170
"HOMEBREW_RUBY_PATH",
170171
"SYSTEMROOT",

tools/cpp/osx_cc_configure.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ def configure_osx_toolchain(repository_ctx, overriden_tools):
8383
# the C++ actions behave consistently.
8484
cc = repository_ctx.path("wrapped_clang")
8585

86+
developer_dir = env.get("DEVELOPER_DIR", default = "")
87+
8688
cc_path = '"$(/usr/bin/dirname "$0")"/wrapped_clang'
8789
repository_ctx.template(
8890
"cc_wrapper.sh",
@@ -114,6 +116,7 @@ def configure_osx_toolchain(repository_ctx, overriden_tools):
114116
xcrun_result = repository_ctx.execute([
115117
"env",
116118
"-i",
119+
"DEVELOPER_DIR={}".format(developer_dir),
117120
"xcrun",
118121
"--sdk",
119122
"macosx",

0 commit comments

Comments
 (0)