OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import shutil | 10 import shutil |
11 import subprocess | 11 import subprocess |
12 import sys | 12 import sys |
13 import utils | 13 import utils |
14 | 14 |
15 HOST_OS = utils.GuessOS() | 15 HOST_OS = utils.GuessOS() |
16 HOST_CPUS = utils.GuessCpus() | 16 HOST_CPUS = utils.GuessCpus() |
17 armcompilerlocation = '/opt/codesourcery/arm-2009q1' | 17 armcompilerlocation = '/usr/local/google/home/zra/armcc' |
18 SCRIPT_DIR = os.path.dirname(sys.argv[0]) | 18 SCRIPT_DIR = os.path.dirname(sys.argv[0]) |
19 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) | 19 DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..')) |
20 THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party') | 20 THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party') |
21 | 21 |
22 def BuildOptions(): | 22 def BuildOptions(): |
23 result = optparse.OptionParser() | 23 result = optparse.OptionParser() |
24 result.add_option("-m", "--mode", | 24 result.add_option("-m", "--mode", |
25 help='Build variants (comma-separated).', | 25 help='Build variants (comma-separated).', |
26 metavar='[all,debug,release]', | 26 metavar='[all,debug,release]', |
27 default='debug') | 27 default='debug') |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 return False | 99 return False |
100 if 'v8' in args: | 100 if 'v8' in args: |
101 print "The v8 target is not supported for android builds." | 101 print "The v8 target is not supported for android builds." |
102 return False | 102 return False |
103 return True | 103 return True |
104 | 104 |
105 | 105 |
106 def SetTools(arch, toolchainprefix): | 106 def SetTools(arch, toolchainprefix): |
107 toolsOverride = None | 107 toolsOverride = None |
108 if arch == 'arm' and toolchainprefix == None: | 108 if arch == 'arm' and toolchainprefix == None: |
109 toolchainprefix = armcompilerlocation + "/bin/arm-none-linux-gnueabi" | 109 toolchainprefix = armcompilerlocation + "/bin/arm-none-linux-gnueabi" |
ricow1
2013/04/09 09:23:06
I suggest changing armcompilerlocation to DEFAULT
zra
2013/04/10 19:04:49
Done. I also updated the "Preparing Your Machine"
ricow1
2013/04/15 11:39:44
Alternatively, and even better, could we show an e
zra
2013/04/15 17:52:58
Done.
| |
110 if toolchainprefix: | 110 if toolchainprefix: |
111 toolsOverride = { | 111 toolsOverride = { |
112 "CC" : toolchainprefix + "-gcc", | 112 "CC.target" : toolchainprefix + "-gcc", |
113 "CXX" : toolchainprefix + "-g++", | 113 "CXX.target" : toolchainprefix + "-g++", |
114 "AR" : toolchainprefix + "-ar", | 114 "AR.target" : toolchainprefix + "-ar", |
115 "LINK": toolchainprefix + "-g++", | 115 "LINK.target": toolchainprefix + "-g++", |
116 "NM" : toolchainprefix + "-nm", | 116 "NM.target" : toolchainprefix + "-nm", |
117 } | 117 } |
118 return toolsOverride | 118 return toolsOverride |
119 | 119 |
120 | 120 |
121 def CheckDirExists(path, docstring): | 121 def CheckDirExists(path, docstring): |
122 if not os.path.isdir(path): | 122 if not os.path.isdir(path): |
123 raise Exception('Could not find %s directory %s' | 123 raise Exception('Could not find %s directory %s' |
124 % (docstring, path)) | 124 % (docstring, path)) |
125 | 125 |
126 | 126 |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 process.wait() | 320 process.wait() |
321 if process.returncode != 0: | 321 if process.returncode != 0: |
322 print "BUILD FAILED" | 322 print "BUILD FAILED" |
323 return 1 | 323 return 1 |
324 | 324 |
325 return 0 | 325 return 0 |
326 | 326 |
327 | 327 |
328 if __name__ == '__main__': | 328 if __name__ == '__main__': |
329 sys.exit(Main()) | 329 sys.exit(Main()) |
OLD | NEW |