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

Unified Diff: build/detect_host_arch.py

Issue 256303003: gyp performance: Load detect_host_arch directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/common.gypi ('k') | build/linux/detect_host_arch.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/detect_host_arch.py
diff --git a/build/linux/detect_host_arch.py b/build/detect_host_arch.py
similarity index 87%
rename from build/linux/detect_host_arch.py
rename to build/detect_host_arch.py
index 268646197accd55215ffed11fd0c1e10a383930c..03fe65651bdbace4068599b4ee250cee96426d40 100755
--- a/build/linux/detect_host_arch.py
+++ b/build/detect_host_arch.py
@@ -11,6 +11,12 @@ import sys
def main():
+ print DoMain([])
+ return 0
+
+def DoMain(args):
Nico 2014/05/27 08:28:56 Maybe `DoMain(_):`?
Daniel Bratell 2014/06/05 07:11:51 Done.
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
host_arch = platform.machine()
# Convert machine type to format recognized by gyp.
@@ -28,8 +34,7 @@ def main():
if host_arch == 'x64' and platform.architecture()[0] == '32bit':
host_arch = 'ia32'
- print host_arch
- return 0
+ return host_arch
if __name__ == '__main__':
sys.exit(main())
« no previous file with comments | « build/common.gypi ('k') | build/linux/detect_host_arch.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698