| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 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 """Install Debian sysroots for building chromium. | 6 """Install Debian sysroots for building chromium. |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 # The sysroot is needed to ensure that binaries that get built will run on | 9 # The sysroot is needed to ensure that binaries that get built will run on |
| 10 # the oldest stable version of Debian that we currently support. | 10 # the oldest stable version of Debian that we currently support. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 Another reason we're installing this by default is so that developers can | 115 Another reason we're installing this by default is so that developers can |
| 116 compile and run on our supported platforms without having to worry about | 116 compile and run on our supported platforms without having to worry about |
| 117 flipping things back and forth and whether the sysroots have been downloaded | 117 flipping things back and forth and whether the sysroots have been downloaded |
| 118 or not. | 118 or not. |
| 119 """ | 119 """ |
| 120 InstallDefaultSysrootForArch(host_arch) | 120 InstallDefaultSysrootForArch(host_arch) |
| 121 | 121 |
| 122 if host_arch == 'amd64': | 122 if host_arch == 'amd64': |
| 123 InstallDefaultSysrootForArch('i386') | 123 InstallDefaultSysrootForArch('i386') |
| 124 | 124 |
| 125 # Desktop Chromium OS builds require the precise sysroot. | |
| 126 # TODO(thomasanderson): only download this when the GN arg target_os | |
| 127 # == 'chromeos', when the functionality to perform the check becomes | |
| 128 # available. | |
| 129 InstallSysroot('Precise', 'amd64') | |
| 130 | |
| 131 # If we can detect a non-standard target_arch such as ARM or MIPS, | 125 # If we can detect a non-standard target_arch such as ARM or MIPS, |
| 132 # then install the sysroot too. Don't attempt to install arm64 | 126 # then install the sysroot too. Don't attempt to install arm64 |
| 133 # since this is currently and android-only architecture. | 127 # since this is currently and android-only architecture. |
| 134 target_arch = DetectTargetArch() | 128 target_arch = DetectTargetArch() |
| 135 if target_arch and target_arch not in (host_arch, 'i386'): | 129 if target_arch and target_arch not in (host_arch, 'i386'): |
| 136 InstallDefaultSysrootForArch(target_arch) | 130 InstallDefaultSysrootForArch(target_arch) |
| 137 | 131 |
| 138 | 132 |
| 139 def main(args): | 133 def main(args): |
| 140 parser = optparse.OptionParser('usage: %prog [OPTIONS]', description=__doc__) | 134 parser = optparse.OptionParser('usage: %prog [OPTIONS]', description=__doc__) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 with open(stamp, 'w') as s: | 224 with open(stamp, 'w') as s: |
| 231 s.write(url) | 225 s.write(url) |
| 232 | 226 |
| 233 | 227 |
| 234 if __name__ == '__main__': | 228 if __name__ == '__main__': |
| 235 try: | 229 try: |
| 236 sys.exit(main(sys.argv[1:])) | 230 sys.exit(main(sys.argv[1:])) |
| 237 except Error as e: | 231 except Error as e: |
| 238 sys.stderr.write(str(e) + '\n') | 232 sys.stderr.write(str(e) + '\n') |
| 239 sys.exit(1) | 233 sys.exit(1) |
| OLD | NEW |