blob: d6e4e3c55709a04bca0bf97b9054039bd70a19da [file] [log] [blame]
Corentin Wallez1a0596d2018-09-10 15:16:10 +02001use_relative_paths = True
Corentin Wallez1a0596d2018-09-10 15:16:10 +02002
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +00003gclient_gn_args_file = 'build/config/gclient_args.gni'
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +00004
Corentin Wallez21a23852018-07-31 18:50:03 +02005vars = {
6 'chromium_git': 'https://chromium.googlesource.com',
Corentin Wallez4c351012018-08-27 10:10:28 +02007 'dawn_git': 'https://dawn.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +02008 'github_git': 'https://github.com',
Corentin Wallez74cebd62019-11-26 18:21:51 +00009 'swiftshader_git': 'https://swiftshader.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +020010
Corentin Wallez21a23852018-07-31 18:50:03 +020011 'dawn_standalone': True,
Ben Claytondc890d62021-09-27 22:55:39 +000012 'dawn_node': False, # Also fetches dependencies required for building NodeJS bindings.
Austin Eng4948c812021-10-15 14:28:32 +000013 'dawn_cmake_version': 'version:3.13.5',
14 'dawn_cmake_win32_sha1': 'b106d66bcdc8a71ea2cdf5446091327bfdb1bcd7',
Corentin Wallez88d5e072021-12-13 15:24:55 +000015 'dawn_gn_version': 'git_revision:fc295f3ac7ca4fe7acc6cb5fb052d22909ef3a8f',
Austin Eng4948c812021-10-15 14:28:32 +000016 'dawn_go_version': 'version:1.16',
Corentin Wallez21a23852018-07-31 18:50:03 +020017}
18
19deps = {
20 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020021 'build': {
Corentin Wallezd5f44ce2021-06-23 09:22:22 +000022 'url': '{chromium_git}/chromium/src/build@0ff4b3d4eeb6d480c716b432a9a93a58c42150d5',
Corentin Wallez21a23852018-07-31 18:50:03 +020023 'condition': 'dawn_standalone',
24 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020025 'buildtools': {
Corentin Wallezd5f44ce2021-06-23 09:22:22 +000026 'url': '{chromium_git}/chromium/src/buildtools@9c143ace7560797fed136da85e22ea4834e6b147',
Corentin Wallez21a23852018-07-31 18:50:03 +020027 'condition': 'dawn_standalone',
28 },
Corentin Wallez60ca94b2021-03-24 16:22:32 +000029 'buildtools/clang_format/script': {
30 'url': '{chromium_git}/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@99803d74e35962f63a775f29477882afd4d57d94',
31 'condition': 'dawn_standalone',
32 },
33
34 'buildtools/linux64': {
35 'packages': [{
36 'package': 'gn/gn/linux-amd64',
Corentin Wallez88d5e072021-12-13 15:24:55 +000037 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000038 }],
39 'dep_type': 'cipd',
40 'condition': 'dawn_standalone and host_os == "linux"',
41 },
42 'buildtools/mac': {
43 'packages': [{
44 'package': 'gn/gn/mac-${{arch}}',
Corentin Wallez88d5e072021-12-13 15:24:55 +000045 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000046 }],
47 'dep_type': 'cipd',
48 'condition': 'dawn_standalone and host_os == "mac"',
49 },
50 'buildtools/win': {
51 'packages': [{
52 'package': 'gn/gn/windows-amd64',
Corentin Wallez88d5e072021-12-13 15:24:55 +000053 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000054 }],
55 'dep_type': 'cipd',
56 'condition': 'dawn_standalone and host_os == "win"',
57 },
58
59 'buildtools/third_party/libc++/trunk': {
60 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@8fa87946779682841e21e2da977eccfb6cb3bded',
61 'condition': 'dawn_standalone',
62 },
63
64 'buildtools/third_party/libc++abi/trunk': {
Corentin Wallezd5f44ce2021-06-23 09:22:22 +000065 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@f4328ad7c0d8242d36cb5bea530925f9fea34248',
Corentin Wallez60ca94b2021-03-24 16:22:32 +000066 'condition': 'dawn_standalone',
67 },
68
Corentin Wallez1a0596d2018-09-10 15:16:10 +020069 'tools/clang': {
Corentin Wallezd5f44ce2021-06-23 09:22:22 +000070 'url': '{chromium_git}/chromium/src/tools/clang@03ff857f12277f511e0a30aca44b80e8aaebafd7',
Corentin Wallez21a23852018-07-31 18:50:03 +020071 'condition': 'dawn_standalone',
72 },
Kai Ninomiyaf526d772020-04-06 22:27:02 +000073 'tools/clang/dsymutil': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000074 'packages': [{
75 'package': 'chromium/llvm-build-tools/dsymutil',
76 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
77 }],
Corentin Wallez2015b2f2021-03-04 17:37:55 +000078 'condition': 'dawn_standalone and (checkout_mac or checkout_ios)',
Kai Ninomiyaf526d772020-04-06 22:27:02 +000079 'dep_type': 'cipd',
80 },
Corentin Wallez21a23852018-07-31 18:50:03 +020081
Corentin Wallez649e2fe2018-08-03 15:57:43 +020082 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020083 'testing': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000084 'url': '{chromium_git}/chromium/src/testing@3e2640a325dc34ec3d9cb2802b8da874aecaf52d',
Corentin Wallez21a23852018-07-31 18:50:03 +020085 'condition': 'dawn_standalone',
86 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020087 'third_party/googletest': {
Shrek Shao2f8f2512021-09-15 19:22:19 +000088 'url': '{chromium_git}/external/github.com/google/googletest@2828773179fa425ee406df61890a150577178ea2',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020089 'condition': 'dawn_standalone',
90 },
Corentin Wallez21a23852018-07-31 18:50:03 +020091
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020092 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020093 'third_party/jinja2': {
James Pricee97594d2021-11-02 08:31:02 +000094 'url': '{chromium_git}/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020095 'condition': 'dawn_standalone',
96 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020097 'third_party/markupsafe': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000098 'url': '{chromium_git}/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020099 'condition': 'dawn_standalone',
100 },
101
Ryan Harrison991b9472020-05-06 23:15:54 +0000102 # WGSL support
103 'third_party/tint': {
Dawn Autoroller5b95b122021-12-21 16:17:33 +0000104 'url': '{dawn_git}/tint@821f9bb525a34f9976627727b04ff9325bc982e6',
Ryan Harrison991b9472020-05-06 23:15:54 +0000105 },
106
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200107 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200108 'third_party/glfw': {
Stephen White3aa929b2021-02-03 19:22:47 +0000109 'url': '{chromium_git}/external/github.com/glfw/glfw@94773111300fee0453844a4c9407af7e880b4df8',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200110 'condition': 'dawn_standalone',
111 },
112
Stephen White77fcdf72021-01-11 15:52:12 +0000113 'third_party/vulkan_memory_allocator': {
Austin Eng972c2382021-12-21 21:21:42 +0000114 'url': '{chromium_git}/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@5e49f57a6e71a026a54eb42e366de09a4142d24e',
Stephen White77fcdf72021-01-11 15:52:12 +0000115 'condition': 'dawn_standalone',
116 },
117
118 'third_party/angle': {
Dawn Autoroller3649af22021-12-16 19:31:38 +0000119 'url': '{chromium_git}/angle/angle@543f5750f70e014dc9c2217fb2fcf1c6b63badd5',
Stephen White77fcdf72021-01-11 15:52:12 +0000120 'condition': 'dawn_standalone',
121 },
122
Corentin Wallez74cebd62019-11-26 18:21:51 +0000123 'third_party/swiftshader': {
Dawn Autoroller2ed5c1c2021-12-21 19:14:52 +0000124 'url': '{swiftshader_git}/SwiftShader@f354daff5a2b882fc182c8377c826aa99b30f989',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000125 'condition': 'dawn_standalone',
126 },
127
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000128 'third_party/vulkan-deps': {
dawn-autorollf6a05442021-12-21 21:07:37 +0000129 'url': '{chromium_git}/vulkan-deps@fbeca8f4ea6a6280982422028e991c2821385383',
Corentin Wallez1fdd0592021-04-02 18:04:27 +0000130 'condition': 'dawn_standalone',
Stephen White77fcdf72021-01-11 15:52:12 +0000131 },
132
133 'third_party/zlib': {
134 'url': '{chromium_git}/chromium/src/third_party/zlib@c29ee8c9c3824ca013479bf8115035527967fe02',
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000135 'condition': 'dawn_standalone',
136 },
Brandon Jonesa04663c2021-09-23 20:36:03 +0000137
138 'third_party/abseil-cpp': {
139 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@789af048b388657987c59d4da406859034fe310f',
140 'condition': 'dawn_standalone',
141 },
Ben Claytondc890d62021-09-27 22:55:39 +0000142
143 # Dependencies required to build Dawn NodeJS bindings
144 'third_party/node-api-headers': {
145 'url': '{github_git}/nodejs/node-api-headers.git@d68505e4055ecb630e14c26c32e5c2c65e179bba',
146 'condition': 'dawn_node',
147 },
148 'third_party/node-addon-api': {
149 'url': '{github_git}/nodejs/node-addon-api.git@4a3de56c3e4ed0031635a2f642b27efeeed00add',
150 'condition': 'dawn_node',
151 },
152 'third_party/gpuweb': {
153 'url': '{github_git}/gpuweb/gpuweb.git@67edc187f5305a72456663c34d51153601b79f3b',
154 'condition': 'dawn_node',
155 },
Austin Eng4948c812021-10-15 14:28:32 +0000156
157 'tools/golang': {
158 'condition': 'dawn_node',
159 'packages': [{
160 'package': 'infra/3pp/tools/go/${{platform}}',
161 'version': Var('dawn_go_version'),
162 }],
163 'dep_type': 'cipd',
164 },
165
166 'tools/cmake': {
167 'condition': 'dawn_node and (host_os == "mac" or host_os == "linux")',
168 'packages': [{
169 'package': 'infra/3pp/tools/cmake/${{platform}}',
170 'version': Var('dawn_cmake_version'),
171 }],
172 'dep_type': 'cipd',
173 },
Corentin Wallez21a23852018-07-31 18:50:03 +0200174}
175
176hooks = [
Corentin Wallez21a23852018-07-31 18:50:03 +0200177 # Pull the compilers and system libraries for hermetic builds
178 {
179 'name': 'sysroot_x86',
180 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000181 'condition': 'dawn_standalone and checkout_linux and (checkout_x86 or checkout_x64)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200182 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200183 '--arch=x86'],
184 },
185 {
186 'name': 'sysroot_x64',
187 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000188 'condition': 'dawn_standalone and checkout_linux and checkout_x64',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200189 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200190 '--arch=x64'],
191 },
192 {
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000193 # Update the Mac toolchain if possible, this makes builders use "hermetic XCode" which is
194 # is more consistent (only changes when rolling build/) and is cached.
195 'name': 'mac_toolchain',
196 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000197 'condition': 'dawn_standalone and checkout_mac',
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000198 'action': ['python', 'build/mac_toolchain.py'],
199 },
200 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200201 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200202 'name': 'win_toolchain',
203 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000204 'condition': 'dawn_standalone and checkout_win',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200205 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200206 },
207 {
208 # Note: On Win, this should run after win_toolchain, as it may use it.
209 'name': 'clang',
210 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200211 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200212 'condition': 'dawn_standalone',
213 },
214 {
215 # Pull rc binaries using checked-in hashes.
216 'name': 'rc_win',
217 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000218 'condition': 'dawn_standalone and checkout_win and host_os == "win"',
Corentin Wallez21a23852018-07-31 18:50:03 +0200219 'action': [ 'download_from_google_storage',
220 '--no_resume',
221 '--no_auth',
222 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200223 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200224 ],
225 },
Corentin Wallez131e6192020-11-03 18:18:06 +0000226 # Pull clang-format binaries using checked-in hashes.
227 {
228 'name': 'clang_format_win',
229 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000230 'condition': 'dawn_standalone and host_os == "win"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000231 'action': [ 'download_from_google_storage',
232 '--no_resume',
233 '--no_auth',
234 '--bucket', 'chromium-clang-format',
235 '-s', 'buildtools/win/clang-format.exe.sha1',
236 ],
237 },
238 {
239 'name': 'clang_format_mac',
240 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000241 'condition': 'dawn_standalone and host_os == "mac"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000242 'action': [ 'download_from_google_storage',
243 '--no_resume',
244 '--no_auth',
245 '--bucket', 'chromium-clang-format',
246 '-s', 'buildtools/mac/clang-format.sha1',
247 ],
248 },
249 {
250 'name': 'clang_format_linux',
251 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000252 'condition': 'dawn_standalone and host_os == "linux"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000253 'action': [ 'download_from_google_storage',
254 '--no_resume',
255 '--no_auth',
256 '--bucket', 'chromium-clang-format',
257 '-s', 'buildtools/linux64/clang-format.sha1',
258 ],
259 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000260 # Update build/util/LASTCHANGE.
261 {
262 'name': 'lastchange',
263 'pattern': '.',
Jiajie Hu2ffc55a2020-07-01 05:08:36 +0000264 'condition': 'dawn_standalone',
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000265 'action': ['python', 'build/util/lastchange.py',
266 '-o', 'build/util/LASTCHANGE'],
267 },
Austin Eng4948c812021-10-15 14:28:32 +0000268 # TODO(https://crbug.com/1180257): Use CIPD for CMake on Windows.
269 {
270 'name': 'cmake_win32',
271 'pattern': '.',
272 'condition': 'dawn_node and host_os == "win"',
273 'action': [ 'download_from_google_storage',
274 '--no_resume',
275 '--platform=win32',
276 '--no_auth',
277 '--bucket', 'chromium-tools',
278 Var('dawn_cmake_win32_sha1'),
279 '-o', 'tools/cmake-win32.zip'
280 ],
281 },
282 {
283 'name': 'cmake_win32_extract',
284 'pattern': '.',
285 'condition': 'dawn_node and host_os == "win"',
286 'action': [ 'python',
287 'scripts/extract.py',
288 'tools/cmake-win32.zip',
289 'tools/cmake-win32/',
290 ],
291 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200292]
293
294recursedeps = [
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000295 'third_party/vulkan-deps',
Corentin Wallez21a23852018-07-31 18:50:03 +0200296]