Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Unified Diff: tools/mb/mb.py

Issue 2360633002: [gn] Hard-code msvs version 2013 in MB. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/mb/mb.py
diff --git a/tools/mb/mb.py b/tools/mb/mb.py
index 536dc00fcb16c4148a9f7a0384b55c1b8fc0a850..6c7c7735ebbe9a3fb2026cf61e148914259a9528 100755
--- a/tools/mb/mb.py
+++ b/tools/mb/mb.py
@@ -36,6 +36,13 @@ sys.path = [os.path.join(CHROMIUM_SRC_DIR, 'build')] + sys.path
import gn_helpers
+# We override this here as some legacy gyp scripts are still called through gn.
+# They rely on the environment variable or otherwise use chromium's default of
+# 2015.
+# TODO(machenbach): For switching to msvs 2015, simply remove this.
+MSVS_VERSION = '2013'
+
+
def main(args):
mbw = MetaBuildWrapper()
return mbw.Main(args)
@@ -777,7 +784,12 @@ class MetaBuildWrapper(object):
self.WriteFile(gn_runtime_deps_path, '\n'.join(gn_labels) + '\n')
cmd.append('--runtime-deps-list-file=%s' % gn_runtime_deps_path)
- ret, _, _ = self.Run(cmd)
+ # Override msvs infra environment variables.
+ env = {}
+ env.update(os.environ)
+ env['GYP_MSVS_VERSION'] = MSVS_VERSION
+
+ ret, _, _ = self.Run(cmd, env=env)
if ret:
# If `gn gen` failed, we should exit early rather than trying to
# generate isolates. Run() will have already logged any error output.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698