aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/cpp/cc_configure.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'tools/cpp/cc_configure.bzl')
-rw-r--r--tools/cpp/cc_configure.bzl4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/cpp/cc_configure.bzl b/tools/cpp/cc_configure.bzl
index 430ea73928..2c5b2a2384 100644
--- a/tools/cpp/cc_configure.bzl
+++ b/tools/cpp/cc_configure.bzl
@@ -267,7 +267,9 @@ def _find_cc(repository_ctx):
"""Find the C++ compiler."""
cc_name = "gcc"
if "CC" in repository_ctx.os.environ:
- cc_name = repository_ctx.os.environ["CC"]
+ cc_name = repository_ctx.os.environ["CC"].strip()
+ if not cc_name:
+ cc_name = "gcc"
if cc_name.startswith("/"):
# Absolute path, maybe we should make this suported by our which function.
return cc_name