OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """A helper script to print paths of NaCl binaries, includes, libs, etc. | 6 """A helper script to print paths of NaCl binaries, includes, libs, etc. |
7 | 7 |
8 It is similar in behavior to pkg-config or sdl-config. | 8 It is similar in behavior to pkg-config or sdl-config. |
9 """ | 9 """ |
10 | 10 |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 'Use the -a or --arch flags to specify one.\n' % ( | 112 'Use the -a or --arch flags to specify one.\n' % ( |
113 ', '.join(VALID_ARCHES), toolchain)) | 113 ', '.join(VALID_ARCHES), toolchain)) |
114 | 114 |
115 if arch: | 115 if arch: |
116 if toolchain == 'pnacl': | 116 if toolchain == 'pnacl': |
117 ExpectArch(arch, VALID_PNACL_ARCHES) | 117 ExpectArch(arch, VALID_PNACL_ARCHES) |
118 else: | 118 else: |
119 ExpectArch(arch, VALID_ARCHES) | 119 ExpectArch(arch, VALID_ARCHES) |
120 | 120 |
121 if arch == 'arm': | 121 if arch == 'arm': |
122 Expect(toolchain in ['newlib', 'bionic'], | 122 Expect(toolchain in ['newlib', 'bionic', 'clang-newlib'], |
123 'The arm arch only supports newlib.') | 123 'The arm arch only supports newlib.') |
124 | 124 |
125 | 125 |
126 def GetArchName(arch): | 126 def GetArchName(arch): |
127 return ARCH_NAME.get(arch) | 127 return ARCH_NAME.get(arch) |
128 | 128 |
129 | 129 |
130 def GetArchAltName(arch): | 130 def GetArchAltName(arch): |
131 return ARCH_ALT_NAME.get(arch) | 131 return ARCH_ALT_NAME.get(arch) |
132 | 132 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 | 267 |
268 return 0 | 268 return 0 |
269 | 269 |
270 | 270 |
271 if __name__ == '__main__': | 271 if __name__ == '__main__': |
272 try: | 272 try: |
273 sys.exit(main(sys.argv[1:])) | 273 sys.exit(main(sys.argv[1:])) |
274 except Error as e: | 274 except Error as e: |
275 sys.stderr.write(str(e) + '\n') | 275 sys.stderr.write(str(e) + '\n') |
276 sys.exit(1) | 276 sys.exit(1) |
OLD | NEW |