aboutsummaryrefslogtreecommitdiffhomepage
path: root/gn/highest_version_dir.py
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-12-06 13:26:38 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-12-06 19:15:55 +0000
commitd34c4a37276c240733a6d17812653636dc3656b5 (patch)
tree84e84b67935ad7475fb015aa867a5adb70493847 /gn/highest_version_dir.py
parent1c80ea828373c3ae3f691c29933cede3c031f407 (diff)
Add win_toolchain_version to support MSVC 2017 Updates
To make this simpler in the future, add a python script that finds the most recent 2017 toolchain, and use that. If/when we update the bot toolchain, this will be even more helpful, because the Chromium toolchain isn't perfectly in sync with the general update channel, so people are likely to have a newer/older release locally. Note that explicitly setting win_toolchain_version in your GN args suppresses the python script, so you can choose to build with whatever version you need. Bug: skia: Change-Id: Iaf6d0dd9be2623472118c3ad27b20023a205d67c Reviewed-on: https://skia-review.googlesource.com/81162 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'gn/highest_version_dir.py')
-rw-r--r--gn/highest_version_dir.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/gn/highest_version_dir.py b/gn/highest_version_dir.py
new file mode 100644
index 0000000000..650154e4f3
--- /dev/null
+++ b/gn/highest_version_dir.py
@@ -0,0 +1,13 @@
+#!/usr/bin/env python
+#
+# Copyright 2017 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+import sys
+
+dirpath, = sys.argv[1:]
+
+print sorted(os.listdir(dirpath))[-1]