From 1a27322a0ad3cf2add141b752eb8e30778de0355 Mon Sep 17 00:00:00 2001 From: Sunjay Bhatia Date: Tue, 3 Nov 2020 16:24:08 -0500 Subject: [PATCH] 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 Co-authored-by: William A Rowe Jr Signed-off-by: Sunjay Bhatia Signed-off-by: William A Rowe Jr --- cc/private/toolchain/windows_cc_configure.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cc/private/toolchain/windows_cc_configure.bzl b/cc/private/toolchain/windows_cc_configure.bzl index 5483272..598d4b2 100644 --- a/cc/private/toolchain/windows_cc_configure.bzl +++ b/cc/private/toolchain/windows_cc_configure.bzl @@ -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."""