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

Side by Side Diff: build/toolchain/linux/find_android_compilers.py

Issue 117863003: Work on GN toolchain definitions and build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/toolchain/linux/BUILD.gn ('k') | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # This script locates the Android compilers given the bin directory of the
6 # android toolchain.
7
8 import glob
9 import subprocess
10 import sys
11
12 if len(sys.argv) != 2:
13 print "Error: expecting one argument of the android toolchain dir."
14 sys.exit(1)
15
16 # TODO(brettw) this logic seems like a bad idea. It was copied from
17 # common.gypi. It seems like the toolchain should just know the name given the
18 # current platform rather than having to rely on glob.
19 android_toolchain = sys.argv[1]
20 cc = glob.glob(android_toolchain + "/*-gcc")
21 cxx = glob.glob(android_toolchain + "/*-g++")
22 if len(cc) != 1 or len(cxx) != 1:
23 print "Either none or more than one matching compiler."
24 sys.exit(1)
25
26 # Get the host compilers from the current path.
27 which_gcc = subprocess.check_output(["which gcc"], shell=True).strip()
28 which_gxx = subprocess.check_output(["which g++"], shell=True).strip()
29
30 print ('["' + cc[0] + '","' + cxx[0] + '","' + which_gcc + '","' +
31 which_gxx + '"]')
OLDNEW
« no previous file with comments | « build/toolchain/linux/BUILD.gn ('k') | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698