OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2017, 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 import multiprocessing | 7 import multiprocessing |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import subprocess | 10 import subprocess |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 return False | 83 return False |
84 options.os = [ProcessOsOption(os_name) for os_name in options.os] | 84 options.os = [ProcessOsOption(os_name) for os_name in options.os] |
85 for os_name in options.os: | 85 for os_name in options.os: |
86 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']: | 86 if not os_name in ['android', 'freebsd', 'linux', 'macos', 'win32']: |
87 print "Unknown os %s" % os_name | 87 print "Unknown os %s" % os_name |
88 return False | 88 return False |
89 if os_name != HOST_OS: | 89 if os_name != HOST_OS: |
90 if os_name != 'android': | 90 if os_name != 'android': |
91 print "Unsupported target os %s" % os_name | 91 print "Unsupported target os %s" % os_name |
92 return False | 92 return False |
93 if not HOST_OS in ['linux']: | 93 if not HOST_OS in ['linux', 'macos']: |
94 print ("Cross-compilation to %s is not supported on host os %s." | 94 print ("Cross-compilation to %s is not supported on host os %s." |
95 % (os_name, HOST_OS)) | 95 % (os_name, HOST_OS)) |
96 return False | 96 return False |
97 if not arch in ['ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64', 'mips', | 97 if not arch in ['ia32', 'x64', 'arm', 'armv6', 'armv5te', 'arm64', 'mips', |
98 'simdbc', 'simdbc64']: | 98 'simdbc', 'simdbc64']: |
99 print ("Cross-compilation to %s is not supported for architecture %s." | 99 print ("Cross-compilation to %s is not supported for architecture %s." |
100 % (os_name, arch)) | 100 % (os_name, arch)) |
101 return False | 101 return False |
102 # We have not yet tweaked the v8 dart build to work with the Android | 102 # We have not yet tweaked the v8 dart build to work with the Android |
103 # NDK/SDK, so don't try to build it. | 103 # NDK/SDK, so don't try to build it. |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 if r != 0: | 308 if r != 0: |
309 return 1 | 309 return 1 |
310 | 310 |
311 endtime = time.time() | 311 endtime = time.time() |
312 print ("The build took %.3f seconds" % (endtime - starttime)) | 312 print ("The build took %.3f seconds" % (endtime - starttime)) |
313 return 0 | 313 return 0 |
314 | 314 |
315 | 315 |
316 if __name__ == '__main__': | 316 if __name__ == '__main__': |
317 sys.exit(Main()) | 317 sys.exit(Main()) |
OLD | NEW |