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

Side by Side Diff: tools/cr/cr/base/android.py

Issue 171903002: android envsetup: Stop honoring --target-arch parameter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 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 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """The android specific platform implementation module.""" 5 """The android specific platform implementation module."""
6 6
7 import os 7 import os
8 import subprocess 8 import subprocess
9 9
10 import cr 10 import cr
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return super(AndroidPlatform, self).priority + 1 52 return super(AndroidPlatform, self).priority + 1
53 53
54 def Prepare(self, context): 54 def Prepare(self, context):
55 """Override Prepare from cr.Platform.""" 55 """Override Prepare from cr.Platform."""
56 super(AndroidPlatform, self).Prepare(context) 56 super(AndroidPlatform, self).Prepare(context)
57 try: 57 try:
58 # capture the result of env setup if we have not already done so 58 # capture the result of env setup if we have not already done so
59 if not self._env_ready: 59 if not self._env_ready:
60 # See what the env would be without env setup 60 # See what the env would be without env setup
61 before = context.exported 61 before = context.exported
62 # Run env setup and capture/parse it's output 62 before['GYP_DEFINES'] = before.get(
63 envsetup = 'source {CR_ENVSETUP} --target-arch={CR_ENVSETUP_ARCH}' 63 'GYP_DEFINES', '') + ' target_arch={CR_ENVSETUP_ARCH}'
iancottrell 2014/02/19 09:58:21 This feels like the wrong place to do this. Is the
Nico 2014/02/19 14:04:06 Yes: envsetup is android-specific, and I'm changin
iancottrell 2014/02/19 14:18:24 I mean that setting the arch for gyp does not need
64 # Run env setup and capture/parse its output
65 envsetup = 'source {CR_ENVSETUP}'
64 output = cr.Host.CaptureShell(context, envsetup + ' > /dev/null && env') 66 output = cr.Host.CaptureShell(context, envsetup + ' > /dev/null && env')
65 env_setup = cr.Config('envsetup', literal=True, export=True) 67 env_setup = cr.Config('envsetup', literal=True, export=True)
66 for line in output.split('\n'): 68 for line in output.split('\n'):
67 (key, op, value) = line.partition('=') 69 (key, op, value) = line.partition('=')
68 if op: 70 if op:
69 key = key.strip() 71 key = key.strip()
70 if key not in _IGNORE_ENV: 72 if key not in _IGNORE_ENV:
71 env_setup[key] = env_setup.ParseValue(value.strip()) 73 env_setup[key] = env_setup.ParseValue(value.strip())
72 if key == 'PATH': 74 if key == 'PATH':
73 self._env_paths = value.strip().split(os.path.pathsep) 75 self._env_paths = value.strip().split(os.path.pathsep)
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 print 'Abandoning the creation of and android output directory.' 126 print 'Abandoning the creation of and android output directory.'
125 exit(1) 127 exit(1)
126 target_os.append('android') 128 target_os.append('android')
127 context.gclient['target_os'] = target_os 129 context.gclient['target_os'] = target_os
128 context.WriteGClient() 130 context.WriteGClient()
129 print 'Client updated.' 131 print 'Client updated.'
130 print 'You may need to sync before an output directory can be made.' 132 print 'You may need to sync before an output directory can be made.'
131 if cr.Host.YesNo('Would you like to sync this client now?'): 133 if cr.Host.YesNo('Would you like to sync this client now?'):
132 cr.SyncCommand.Sync(context, ["--nohooks"]) 134 cr.SyncCommand.Sync(context, ["--nohooks"])
133 135
OLDNEW
« no previous file with comments | « build/gyp_chromium ('k') | tools/cr/cr/base/arch.py » ('j') | tools/cr/cr/base/arch.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698