| 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'] | |
| 128 if toolchainprefix: | 123 if toolchainprefix: |
| 129 toolsOverride = { | 124 toolsOverride = { |
| 130 "CC.target" : toolchainprefix + "-gcc", | 125 "CC.target" : toolchainprefix + "-gcc", |
| 131 "CXX.target" : toolchainprefix + "-g++", | 126 "CXX.target" : toolchainprefix + "-g++", |
| 132 "AR.target" : toolchainprefix + "-ar", | 127 "AR.target" : toolchainprefix + "-ar", |
| 133 "LINK.target": toolchainprefix + "-g++", | 128 "LINK.target": toolchainprefix + "-g++", |
| 134 "NM.target" : toolchainprefix + "-nm", | 129 "NM.target" : toolchainprefix + "-nm", |
| 135 } | 130 } |
| 136 return toolsOverride | 131 return toolsOverride |
| 137 | 132 |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 process.wait() | 447 process.wait() |
| 453 if process.returncode != 0: | 448 if process.returncode != 0: |
| 454 print "BUILD FAILED" | 449 print "BUILD FAILED" |
| 455 return 1 | 450 return 1 |
| 456 | 451 |
| 457 return 0 | 452 return 0 |
| 458 | 453 |
| 459 | 454 |
| 460 if __name__ == '__main__': | 455 if __name__ == '__main__': |
| 461 sys.exit(Main()) | 456 sys.exit(Main()) |
| OLD | NEW |