cros_setup_toolchain: Fix clang++ invocation.

Newer clang release do not use X.Y prefixes for clang binary,
but just use a clang-X notation.
This is breaking the pattern match in Clang wrapper symlink fixup.

BUG=chromium:837889
TEST=Correct symlinks are created.

Change-Id: I49a79588d03ee9399e13bd0d3480b8f7923a4a3c
Reviewed-on: https://chromium-review.googlesource.com/1034205
Trybot-Ready: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
diff --git a/scripts/cros_setup_toolchains.py b/scripts/cros_setup_toolchains.py
index 73ee292..0a8e991 100644
--- a/scripts/cros_setup_toolchains.py
+++ b/scripts/cros_setup_toolchains.py
@@ -801,11 +801,15 @@
   -) The difference this time is that inside the elf file execution, $0 is
      set as .../usr/bin/clang++-3.9.elf, which contains 'clang++' in the name.
 
+  Update: Starting since clang 7, the clang and clang++ are symlinks to
+  clang-7 binary, not clang-7.0. The pattern match is extended to handle
+  both clang-7 and clang-7.0 cases for now. (https://crbug.com/837889)
+
   Args:
     root: The root tree to generate scripts / symlinks inside of
     path: The target elf for which LdsoWrapper was created
   """
-  if re.match(r'/usr/bin/clang-\d+\.\d+$', path):
+  if re.match(r'/usr/bin/clang-\d+(\.\d+)*$', path):
     logging.info('fixing clang++ invocation for %s', path)
     clangdir = os.path.dirname(root + path)
     clang = os.path.basename(path)