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 will run on Debian Wheezy, | 9 # The sysroot is needed to ensure that binaries will run on Debian Wheezy, |
10 # the oldest supported linux distribution. For ARM64 linux, we have Debian | 10 # the oldest supported linux distribution. For ARM64 linux, we have Debian |
(...skipping 19 matching lines...) Expand all Loading... |
30 sys.path.append(os.path.dirname(os.path.dirname(SCRIPT_DIR))) | 30 sys.path.append(os.path.dirname(os.path.dirname(SCRIPT_DIR))) |
31 import detect_host_arch | 31 import detect_host_arch |
32 import gyp_chromium | 32 import gyp_chromium |
33 import gyp_environment | 33 import gyp_environment |
34 | 34 |
35 | 35 |
36 URL_PREFIX = 'https://commondatastorage.googleapis.com' | 36 URL_PREFIX = 'https://commondatastorage.googleapis.com' |
37 URL_PATH = 'chrome-linux-sysroot/toolchain' | 37 URL_PATH = 'chrome-linux-sysroot/toolchain' |
38 | 38 |
39 SYSROOTS = { | 39 SYSROOTS = { |
40 ('Wheezy', 'amd64'): { | 40 ('Jessie', 'amd64'): { |
41 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 41 'Revision' : '0b14b85bb20d4fb10c05d37631435236670f0c7c', |
42 'Tarball' : 'debian_wheezy_amd64_sysroot.tgz', | 42 'Tarball' : 'debian_jessie_amd64_sysroot.tgz', |
43 'Sha1Sum' : 'a7f3df28b02799fbd7675c2ab24f1924c104c0ee', | 43 'Sha1Sum' : '413c5ea044829519e43dfb7c5dbe51d3e2c24d2b', |
44 'SysrootDir' : 'debian_wheezy_amd64-sysroot' | 44 'SysrootDir' : 'debian_jessie_amd64-sysroot' |
45 }, | 45 }, |
46 ('Wheezy', 'arm'): { | 46 ('Jessie', 'arm'): { |
47 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 47 'Revision' : '0b14b85bb20d4fb10c05d37631435236670f0c7c', |
48 'Tarball' : 'debian_wheezy_arm_sysroot.tgz', | 48 'Tarball' : 'debian_jessie_arm_sysroot.tgz', |
49 'Sha1Sum' : '2df01b8173a363977daf04e176b8c7dba5b0b933', | 49 'Sha1Sum' : '7650a0af1ff07be6e15585f72df2b680271149af', |
50 'SysrootDir' : 'debian_wheezy_arm-sysroot' | 50 'SysrootDir' : 'debian_jessie_arm-sysroot' |
51 }, | 51 }, |
52 ('Wheezy', 'i386'): { | 52 ('Jessie', 'i386'): { |
53 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 53 'Revision' : '0b14b85bb20d4fb10c05d37631435236670f0c7c', |
54 'Tarball' : 'debian_wheezy_i386_sysroot.tgz', | 54 'Tarball' : 'debian_jessie_i386_sysroot.tgz', |
55 'Sha1Sum' : 'e2c7131fa5f711de28c37fd9442e77d32abfb3ff', | 55 'Sha1Sum' : '153de0c3c8a90958916372ade159b60128139c4f', |
56 'SysrootDir' : 'debian_wheezy_i386-sysroot' | 56 'SysrootDir' : 'debian_jessie_i386-sysroot' |
57 }, | 57 }, |
58 ('Wheezy', 'mips'): { | 58 ('Jessie', 'mips'): { |
59 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 59 'Revision' : '0b14b85bb20d4fb10c05d37631435236670f0c7c', |
60 'Tarball' : 'debian_wheezy_mips_sysroot.tgz', | 60 'Tarball' : 'debian_jessie_mips_sysroot.tgz', |
61 'Sha1Sum' : '22fe7b45b144691aeb515083025f0fceb131d724', | 61 'Sha1Sum' : 'e2a62491b4e4887750f00c57ebf9515cfc624562', |
62 'SysrootDir' : 'debian_wheezy_mips-sysroot' | 62 'SysrootDir' : 'debian_jessie_mips-sysroot' |
63 }, | 63 }, |
64 ('Jessie', 'arm64'): { | 64 ('Jessie', 'arm64'): { |
65 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 65 'Revision' : '0b14b85bb20d4fb10c05d37631435236670f0c7c', |
66 'Tarball' : 'debian_jessie_arm64_sysroot.tgz', | 66 'Tarball' : 'debian_jessie_arm64_sysroot.tgz', |
67 'Sha1Sum' : 'df9270e00c258e6cd80f8172b1bfa39aafc4756f', | 67 'Sha1Sum' : '4dc75d644cc9aae0d641124a240aefb4fd32dd08', |
68 'SysrootDir' : 'debian_jessie_arm64-sysroot' | 68 'SysrootDir' : 'debian_jessie_arm64-sysroot' |
69 }, | 69 }, |
70 ('Precise', 'amd64'): { | 70 ('Precise', 'amd64'): { |
71 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', | 71 'Revision' : '24f935a3d8cdfcdfbabd23928a42304b1ffc52ba', |
72 'Tarball' : 'ubuntu_precise_amd64_sysroot.tgz', | 72 'Tarball' : 'ubuntu_precise_amd64_sysroot.tgz', |
73 'Sha1Sum' : '67985675e64e1d3cf6574088f36f89092ae9e86b', | 73 'Sha1Sum' : '67985675e64e1d3cf6574088f36f89092ae9e86b', |
74 'SysrootDir' : 'ubuntu_precise_amd64-sysroot' | 74 'SysrootDir' : 'ubuntu_precise_amd64-sysroot' |
75 } | 75 } |
76 } | 76 } |
77 | 77 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 else: | 186 else: |
187 if not options.arch: | 187 if not options.arch: |
188 print 'You much specify either --arch or --running-as-hook' | 188 print 'You much specify either --arch or --running-as-hook' |
189 return 1 | 189 return 1 |
190 InstallDefaultSysrootForArch(options.arch) | 190 InstallDefaultSysrootForArch(options.arch) |
191 | 191 |
192 return 0 | 192 return 0 |
193 | 193 |
194 def InstallDefaultSysrootForArch(target_arch): | 194 def InstallDefaultSysrootForArch(target_arch): |
195 if target_arch == 'amd64': | 195 if target_arch == 'amd64': |
196 InstallSysroot('Wheezy', 'amd64') | 196 InstallSysroot('Jessie', 'amd64') |
197 elif target_arch == 'arm': | 197 elif target_arch == 'arm': |
198 InstallSysroot('Wheezy', 'arm') | 198 InstallSysroot('Jessie', 'arm') |
199 elif target_arch == 'arm64': | 199 elif target_arch == 'arm64': |
200 InstallSysroot('Jessie', 'arm64') | 200 InstallSysroot('Jessie', 'arm64') |
201 elif target_arch == 'i386': | 201 elif target_arch == 'i386': |
202 InstallSysroot('Wheezy', 'i386') | 202 InstallSysroot('Jessie', 'i386') |
203 elif target_arch == 'mips': | 203 elif target_arch == 'mips': |
204 InstallSysroot('Wheezy', 'mips') | 204 InstallSysroot('Jessie', 'mips') |
205 else: | 205 else: |
206 raise Error('Unknown architecture: %s' % target_arch) | 206 raise Error('Unknown architecture: %s' % target_arch) |
207 | 207 |
208 def InstallSysroot(target_platform, target_arch): | 208 def InstallSysroot(target_platform, target_arch): |
209 # The sysroot directory should match the one specified in build/common.gypi. | 209 # The sysroot directory should match the one specified in build/common.gypi. |
210 # TODO(thestig) Consider putting this else where to avoid having to recreate | 210 # TODO(thestig) Consider putting this else where to avoid having to recreate |
211 # it on every build. | 211 # it on every build. |
212 linux_dir = os.path.dirname(SCRIPT_DIR) | 212 linux_dir = os.path.dirname(SCRIPT_DIR) |
213 | 213 |
214 if (target_platform, target_arch) not in SYSROOTS: | 214 if (target_platform, target_arch) not in SYSROOTS: |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 with open(stamp, 'w') as s: | 250 with open(stamp, 'w') as s: |
251 s.write(url) | 251 s.write(url) |
252 | 252 |
253 | 253 |
254 if __name__ == '__main__': | 254 if __name__ == '__main__': |
255 try: | 255 try: |
256 sys.exit(main(sys.argv[1:])) | 256 sys.exit(main(sys.argv[1:])) |
257 except Error as e: | 257 except Error as e: |
258 sys.stderr.write(str(e) + '\n') | 258 sys.stderr.write(str(e) + '\n') |
259 sys.exit(1) | 259 sys.exit(1) |
OLD | NEW |