OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2014 the V8 project authors. All rights reserved. | 2 # Copyright 2014 the V8 project authors. All rights reserved. |
3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
5 # met: | 5 # met: |
6 # | 6 # |
7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
10 # copyright notice, this list of conditions and the following | 10 # copyright notice, this list of conditions and the following |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 # Convert machine type to format recognized by gyp. | 45 # Convert machine type to format recognized by gyp. |
46 if re.match(r'i.86', host_arch) or host_arch == 'i86pc': | 46 if re.match(r'i.86', host_arch) or host_arch == 'i86pc': |
47 host_arch = 'ia32' | 47 host_arch = 'ia32' |
48 elif host_arch in ['x86_64', 'amd64']: | 48 elif host_arch in ['x86_64', 'amd64']: |
49 host_arch = 'x64' | 49 host_arch = 'x64' |
50 elif host_arch.startswith('arm'): | 50 elif host_arch.startswith('arm'): |
51 host_arch = 'arm' | 51 host_arch = 'arm' |
52 elif host_arch == 'aarch64': | 52 elif host_arch == 'aarch64': |
53 host_arch = 'arm64' | 53 host_arch = 'arm64' |
| 54 elif host_arch == 'mips64': |
| 55 host_arch = 'mips64el' |
54 elif host_arch.startswith('mips'): | 56 elif host_arch.startswith('mips'): |
55 host_arch = 'mipsel' | 57 host_arch = 'mipsel' |
56 | 58 |
57 # platform.machine is based on running kernel. It's possible to use 64-bit | 59 # platform.machine is based on running kernel. It's possible to use 64-bit |
58 # kernel with 32-bit userland, e.g. to give linker slightly more memory. | 60 # kernel with 32-bit userland, e.g. to give linker slightly more memory. |
59 # Distinguish between different userland bitness by querying | 61 # Distinguish between different userland bitness by querying |
60 # the python binary. | 62 # the python binary. |
61 if host_arch == 'x64' and platform.architecture()[0] == '32bit': | 63 if host_arch == 'x64' and platform.architecture()[0] == '32bit': |
62 host_arch = 'ia32' | 64 host_arch = 'ia32' |
63 | 65 |
64 return host_arch | 66 return host_arch |
65 | 67 |
66 if __name__ == '__main__': | 68 if __name__ == '__main__': |
67 sys.exit(main()) | 69 sys.exit(main()) |
OLD | NEW |