Skip to content

Commit

Permalink
Replace macOS CC path with relative path
Browse files Browse the repository at this point in the history
After this change #8495 the path
to CC embedded in this file was absolute, which caused cache misses for
all compile actions. This change depends on this file relative to the
cc_wrapper itself instead.

Fixes #10184

Closes #10185.

PiperOrigin-RevId: 279960066
  • Loading branch information
keith authored and copybara-github committed Nov 12, 2019
1 parent 8e7c349 commit c76c3e5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/cpp/osx_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ def configure_osx_toolchain(repository_ctx, overriden_tools):
# the C++ actions behave consistently.
cc = repository_ctx.path("wrapped_clang")

cc_path = '"$(dirname "$0")"/wrapped_clang'
repository_ctx.template(
"cc_wrapper.sh",
paths["@bazel_tools//tools/cpp:osx_cc_wrapper.sh.tpl"],
{
"%{cc}": escape_string(str(cc)),
"%{cc}": escape_string(cc_path),
"%{env}": escape_string(get_env(repository_ctx)),
},
)
Expand Down

0 comments on commit c76c3e5

Please sign in to comment.