Skip to content

Commit

Permalink
Do not fail the build when gcov is not installed
Browse files Browse the repository at this point in the history
Fixes #5066.

RELNOTES: None.
PiperOrigin-RevId: 210521623
  • Loading branch information
hlopko authored and Copybara-Service committed Aug 28, 2018
1 parent b495eaf commit 1d956c7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/cpp/unix_cc_configure.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ def _coverage_feature(repository_ctx, darwin):
}
"""

def _find_generic(repository_ctx, name, env_name, overriden_tools, warn = False):
def _find_generic(repository_ctx, name, env_name, overriden_tools, warn = False, silent = False):
"""Find a generic C++ toolchain tool. Doesn't %-escape the result."""

if name in overriden_tools:
Expand All @@ -460,7 +460,8 @@ def _find_generic(repository_ctx, name, env_name, overriden_tools, warn = False)
msg = ("Cannot find %s or %s%s; either correct your path or set the %s" +
" environment variable") % (name, env_name, env_value_with_paren, env_name)
if warn:
auto_configure_warning(msg)
if not silent:
auto_configure_warning(msg)
else:
auto_configure_fail(msg)
return result
Expand Down Expand Up @@ -488,6 +489,8 @@ def configure_unix_toolchain(repository_ctx, cpu_value, overriden_tools):
"gcov",
"GCOV",
overriden_tools,
warn = True,
silent = True,
)
if darwin:
overriden_tools["gcc"] = "cc_wrapper.sh"
Expand Down

0 comments on commit 1d956c7

Please sign in to comment.