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

Unified Diff: build_tools/run_without_cygwin.py

Issue 1000163003: Generate the icu data binaries at compile time instead of checking in binaries Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@master
Patch Set: Fixed warnings in cross compiling Created 5 years, 8 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 | « build_tools/filter_data_for_size_unittest.py ('k') | build_tools/write_icudata_lst.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build_tools/run_without_cygwin.py
diff --git a/build_tools/run_without_cygwin.py b/build_tools/run_without_cygwin.py
new file mode 100644
index 0000000000000000000000000000000000000000..d299537b3484a14a5ca0a1ef48b1fd953f12db99
--- /dev/null
+++ b/build_tools/run_without_cygwin.py
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+# Copyright 2014 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""This program wraps an arbitrary command since gn currently can only execute
+scripts."""
+
+import os
+import subprocess
+import sys
+
+try:
+ env = os.environ
+ if "PATH" in env:
+ path = env["PATH"]
+ if "cygwin" in path:
+ # Needed to make pkgdata and similar work.
+ print("Removing cygwin from path.")
+ parts = path.split(";")
+ path = ";".join([x for x in parts if not "cygwin" in x])
+ env["PATH"] = path
+ res = subprocess.call(sys.argv[1:], env=env)
+except Exception as e:
+ res = 1
+ print("%s" % e)
+
+if res != 0:
+ print("In %s" % os.getcwd())
+ print("%s" % sys.argv)
+
+sys.exit(res)
« no previous file with comments | « build_tools/filter_data_for_size_unittest.py ('k') | build_tools/write_icudata_lst.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698