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

Unified Diff: third_party/WebKit/Source/build/scripts/gperf.py

Issue 2403583002: More changes to support hermetic Xcode toolchain in GN. (Closed)
Patch Set: Comments from thakis. Created 4 years, 2 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
Index: third_party/WebKit/Source/build/scripts/gperf.py
diff --git a/third_party/WebKit/Source/build/scripts/gperf.py b/third_party/WebKit/Source/build/scripts/gperf.py
index 040cec67d3bb8b8d65a29f7693d8f04f28bba107..7e8eaee108f4e97170862900a851e953aad6b919 100644
--- a/third_party/WebKit/Source/build/scripts/gperf.py
+++ b/third_party/WebKit/Source/build/scripts/gperf.py
@@ -2,11 +2,25 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-# Invokes gperf for the GN build. The first argument is the path to gperf.
+# Invokes gperf for the GN build.
+# Usage: gperf.py [--developer_dir PATH_TO_XCODE] gperf ...
# TODO(brettw) this can be removed once the run_executable rules have been
# checked in for the GN build.
+import argparse
+import os
import subprocess
import sys
-subprocess.check_call(sys.argv[1:])
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument("--developer_dir", required=False)
+ args, unknownargs = parser.parse_known_args()
+ if args.developer_dir:
+ os.environ['DEVELOPER_DIR'] = args.developer_dir
+
+ subprocess.check_call(unknownargs)
+
+if __name__ == '__main__':
+ main()
« no previous file with comments | « chrome/tools/build/mac/copy_keystone_framework.py ('k') | third_party/WebKit/Source/build/scripts/in_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698