Resolve the clang-cl version detection

- bazel presumed a trailing space in `clang-cl -v` output that is
  no longer present in the 11.0.0 release, resulting in an injected newline

Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com>
Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
This commit is contained in:
Sunjay Bhatia 2020-11-03 16:24:08 -05:00 committed by William A Rowe Jr
parent 991eb349bf
commit 1a27322a0a
1 changed files with 1 additions and 1 deletions

View File

@ -471,7 +471,7 @@ def _get_clang_version(repository_ctx, clang_cl):
auto_configure_fail("Failed to get clang version by running \"%s -v\"" % clang_cl)
# Stderr should look like "clang version X.X.X ..."
return result.stderr.strip().split(" ")[2]
return result.stderr.splitlines()[0].split(" ")[2]
def _get_msys_mingw_vars(repository_ctx):
"""Get the variables we need to populate the msys/mingw toolchains."""