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 re | 10 import re |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 if 'v8' in args: | 113 if 'v8' in args: |
114 print "The v8 target is not supported for android builds." | 114 print "The v8 target is not supported for android builds." |
115 return False | 115 return False |
116 return True | 116 return True |
117 | 117 |
118 | 118 |
119 def SetTools(arch, toolchainprefix): | 119 def SetTools(arch, toolchainprefix): |
120 toolsOverride = None | 120 toolsOverride = None |
121 if arch == 'arm' and toolchainprefix == None: | 121 if arch == 'arm' and toolchainprefix == None: |
122 toolchainprefix = DEFAULT_ARM_CROSS_COMPILER_PATH + "/bin/arm-linux-gnueabi" | 122 toolchainprefix = DEFAULT_ARM_CROSS_COMPILER_PATH + "/bin/arm-linux-gnueabi" |
| 123 # If the 'TARGET_TOOLCHAIN_PREFIX' environment variable is set, we use it |
| 124 # instead. (We use it currently on our buildbots to override the default |
| 125 # toolchain). |
| 126 if 'TARGET_TOOLCHAIN_PREFIX' in os.environ: |
| 127 toolchainprefix = os.environ['TARGET_TOOLCHAIN_PREFIX'] |
123 if toolchainprefix: | 128 if toolchainprefix: |
124 toolsOverride = { | 129 toolsOverride = { |
125 "CC.target" : toolchainprefix + "-gcc", | 130 "CC.target" : toolchainprefix + "-gcc", |
126 "CXX.target" : toolchainprefix + "-g++", | 131 "CXX.target" : toolchainprefix + "-g++", |
127 "AR.target" : toolchainprefix + "-ar", | 132 "AR.target" : toolchainprefix + "-ar", |
128 "LINK.target": toolchainprefix + "-g++", | 133 "LINK.target": toolchainprefix + "-g++", |
129 "NM.target" : toolchainprefix + "-nm", | 134 "NM.target" : toolchainprefix + "-nm", |
130 } | 135 } |
131 return toolsOverride | 136 return toolsOverride |
132 | 137 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
447 process.wait() | 452 process.wait() |
448 if process.returncode != 0: | 453 if process.returncode != 0: |
449 print "BUILD FAILED" | 454 print "BUILD FAILED" |
450 return 1 | 455 return 1 |
451 | 456 |
452 return 0 | 457 return 0 |
453 | 458 |
454 | 459 |
455 if __name__ == '__main__': | 460 if __name__ == '__main__': |
456 sys.exit(Main()) | 461 sys.exit(Main()) |
OLD | NEW |