blob: 668193b1a9d658945e0d0301c43cef48076994c0 [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 Wallezd5203662022-01-05 15:54:08 +00005gclient_gn_args = [
6 'generate_location_tags',
7]
8
Corentin Wallez21a23852018-07-31 18:50:03 +02009vars = {
10 'chromium_git': 'https://chromium.googlesource.com',
Corentin Wallez4c351012018-08-27 10:10:28 +020011 'dawn_git': 'https://dawn.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +020012 'github_git': 'https://github.com',
Corentin Wallez74cebd62019-11-26 18:21:51 +000013 'swiftshader_git': 'https://swiftshader.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +020014
Corentin Wallez21a23852018-07-31 18:50:03 +020015 'dawn_standalone': True,
Ben Claytondc890d62021-09-27 22:55:39 +000016 'dawn_node': False, # Also fetches dependencies required for building NodeJS bindings.
Austin Eng4948c812021-10-15 14:28:32 +000017 'dawn_cmake_version': 'version:3.13.5',
18 'dawn_cmake_win32_sha1': 'b106d66bcdc8a71ea2cdf5446091327bfdb1bcd7',
Corentin Wallez88d5e072021-12-13 15:24:55 +000019 'dawn_gn_version': 'git_revision:fc295f3ac7ca4fe7acc6cb5fb052d22909ef3a8f',
Austin Eng4948c812021-10-15 14:28:32 +000020 'dawn_go_version': 'version:1.16',
Corentin Wallezd5203662022-01-05 15:54:08 +000021
22 # GN variable required by //testing that will be output in the gclient_args.gni
23 'generate_location_tags': False,
Corentin Wallez21a23852018-07-31 18:50:03 +020024}
25
26deps = {
27 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020028 'build': {
Corentin Wallezd5203662022-01-05 15:54:08 +000029 'url': '{chromium_git}/chromium/src/build@555c8b467c21e2c4b22d00e87e3faa0431df9ac2',
Corentin Wallez21a23852018-07-31 18:50:03 +020030 'condition': 'dawn_standalone',
31 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020032 'buildtools': {
Corentin Wallezd5203662022-01-05 15:54:08 +000033 'url': '{chromium_git}/chromium/src/buildtools@f78b4b9f33bd8ef9944d5ce643daff1c31880189',
Corentin Wallez21a23852018-07-31 18:50:03 +020034 'condition': 'dawn_standalone',
35 },
Corentin Wallez60ca94b2021-03-24 16:22:32 +000036 'buildtools/clang_format/script': {
37 'url': '{chromium_git}/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@99803d74e35962f63a775f29477882afd4d57d94',
38 'condition': 'dawn_standalone',
39 },
40
41 'buildtools/linux64': {
42 'packages': [{
43 'package': 'gn/gn/linux-amd64',
Corentin Wallez88d5e072021-12-13 15:24:55 +000044 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000045 }],
46 'dep_type': 'cipd',
47 'condition': 'dawn_standalone and host_os == "linux"',
48 },
49 'buildtools/mac': {
50 'packages': [{
51 'package': 'gn/gn/mac-${{arch}}',
Corentin Wallez88d5e072021-12-13 15:24:55 +000052 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000053 }],
54 'dep_type': 'cipd',
55 'condition': 'dawn_standalone and host_os == "mac"',
56 },
57 'buildtools/win': {
58 'packages': [{
59 'package': 'gn/gn/windows-amd64',
Corentin Wallez88d5e072021-12-13 15:24:55 +000060 'version': Var('dawn_gn_version'),
Corentin Wallez60ca94b2021-03-24 16:22:32 +000061 }],
62 'dep_type': 'cipd',
63 'condition': 'dawn_standalone and host_os == "win"',
64 },
65
66 'buildtools/third_party/libc++/trunk': {
Corentin Wallezd5203662022-01-05 15:54:08 +000067 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@79a2e924d96e2fc1e4b937c42efd08898fa472d7',
Corentin Wallez60ca94b2021-03-24 16:22:32 +000068 'condition': 'dawn_standalone',
69 },
70
71 'buildtools/third_party/libc++abi/trunk': {
Corentin Wallezd5203662022-01-05 15:54:08 +000072 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@2715a6c0de8dac4c7674934a6b3d30ba0c685271',
Corentin Wallez60ca94b2021-03-24 16:22:32 +000073 'condition': 'dawn_standalone',
74 },
75
Corentin Wallez1a0596d2018-09-10 15:16:10 +020076 'tools/clang': {
Corentin Wallezd5203662022-01-05 15:54:08 +000077 'url': '{chromium_git}/chromium/src/tools/clang@8b7330592cb85ba09505a6be7bacabd0ad6160a3',
Corentin Wallez21a23852018-07-31 18:50:03 +020078 'condition': 'dawn_standalone',
79 },
Kai Ninomiyaf526d772020-04-06 22:27:02 +000080 'tools/clang/dsymutil': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000081 'packages': [{
82 'package': 'chromium/llvm-build-tools/dsymutil',
83 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
84 }],
Corentin Wallez2015b2f2021-03-04 17:37:55 +000085 'condition': 'dawn_standalone and (checkout_mac or checkout_ios)',
Kai Ninomiyaf526d772020-04-06 22:27:02 +000086 'dep_type': 'cipd',
87 },
Corentin Wallez21a23852018-07-31 18:50:03 +020088
Corentin Wallez649e2fe2018-08-03 15:57:43 +020089 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020090 'testing': {
Corentin Wallezd5203662022-01-05 15:54:08 +000091 'url': '{chromium_git}/chromium/src/testing@d485ae97b7900c1fb7edfbe2901ae5adcb120865',
Corentin Wallez21a23852018-07-31 18:50:03 +020092 'condition': 'dawn_standalone',
93 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020094 'third_party/googletest': {
Corentin Wallezd5203662022-01-05 15:54:08 +000095 'url': '{chromium_git}/external/github.com/google/googletest@6b74da4757a549563d7c37c8fae3e704662a043b',
96 'condition': 'dawn_standalone',
97 },
98 # This is a dependency of //testing
99 'third_party/catapult': {
100 'url': '{chromium_git}/catapult.git@fa35beefb3429605035f98211ddb8750dee6a13d',
Corentin Wallez649e2fe2018-08-03 15:57:43 +0200101 'condition': 'dawn_standalone',
102 },
Corentin Wallez21a23852018-07-31 18:50:03 +0200103
Corentin Wallez3bb0bb92018-08-13 17:47:44 +0200104 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200105 'third_party/jinja2': {
James Pricee97594d2021-11-02 08:31:02 +0000106 'url': '{chromium_git}/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +0200107 'condition': 'dawn_standalone',
108 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200109 'third_party/markupsafe': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +0000110 'url': '{chromium_git}/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +0200111 'condition': 'dawn_standalone',
112 },
113
Ryan Harrison991b9472020-05-06 23:15:54 +0000114 # WGSL support
115 'third_party/tint': {
Ben Claytonf52a2272022-01-21 22:28:39 +0000116 'url': '{dawn_git}/tint@b4cd255c6ecc8db6d49274b8de378b33c478c629',
Ryan Harrison991b9472020-05-06 23:15:54 +0000117 },
118
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200119 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200120 'third_party/glfw': {
Stephen White3aa929b2021-02-03 19:22:47 +0000121 'url': '{chromium_git}/external/github.com/glfw/glfw@94773111300fee0453844a4c9407af7e880b4df8',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200122 'condition': 'dawn_standalone',
123 },
124
Stephen White77fcdf72021-01-11 15:52:12 +0000125 'third_party/vulkan_memory_allocator': {
Austin Eng972c2382021-12-21 21:21:42 +0000126 'url': '{chromium_git}/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@5e49f57a6e71a026a54eb42e366de09a4142d24e',
Stephen White77fcdf72021-01-11 15:52:12 +0000127 'condition': 'dawn_standalone',
128 },
129
130 'third_party/angle': {
Dawn Autoroller86cb73b2022-01-19 02:47:46 +0000131 'url': '{chromium_git}/angle/angle@00a2a2f3e84ea568afb200169f2e47758e385f3d',
Stephen White77fcdf72021-01-11 15:52:12 +0000132 'condition': 'dawn_standalone',
133 },
134
Corentin Wallez74cebd62019-11-26 18:21:51 +0000135 'third_party/swiftshader': {
Dawn Autoroller1cff9892022-01-19 05:38:39 +0000136 'url': '{swiftshader_git}/SwiftShader@2e74d5dc03dfbfab0821f9aac5d2b3ad317eab28',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000137 'condition': 'dawn_standalone',
138 },
139
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000140 'third_party/vulkan-deps': {
dawn-autoroll1351d4b2022-01-19 09:19:28 +0000141 'url': '{chromium_git}/vulkan-deps@d1b842fca80dddd1a098bf63813386e3e44f9642',
Corentin Wallez1fdd0592021-04-02 18:04:27 +0000142 'condition': 'dawn_standalone',
Stephen White77fcdf72021-01-11 15:52:12 +0000143 },
144
145 'third_party/zlib': {
146 'url': '{chromium_git}/chromium/src/third_party/zlib@c29ee8c9c3824ca013479bf8115035527967fe02',
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000147 'condition': 'dawn_standalone',
148 },
Brandon Jonesa04663c2021-09-23 20:36:03 +0000149
150 'third_party/abseil-cpp': {
151 'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@789af048b388657987c59d4da406859034fe310f',
152 'condition': 'dawn_standalone',
153 },
Ben Claytondc890d62021-09-27 22:55:39 +0000154
155 # Dependencies required to build Dawn NodeJS bindings
156 'third_party/node-api-headers': {
157 'url': '{github_git}/nodejs/node-api-headers.git@d68505e4055ecb630e14c26c32e5c2c65e179bba',
158 'condition': 'dawn_node',
159 },
160 'third_party/node-addon-api': {
161 'url': '{github_git}/nodejs/node-addon-api.git@4a3de56c3e4ed0031635a2f642b27efeeed00add',
162 'condition': 'dawn_node',
163 },
164 'third_party/gpuweb': {
Corentin Wallez0275a4c2022-01-10 15:26:31 +0000165 'url': '{github_git}/gpuweb/gpuweb.git@0aadaca4c53ca131aa19708c1d2b1bed56da1118',
Ben Claytondc890d62021-09-27 22:55:39 +0000166 'condition': 'dawn_node',
167 },
Austin Eng4948c812021-10-15 14:28:32 +0000168
169 'tools/golang': {
170 'condition': 'dawn_node',
171 'packages': [{
172 'package': 'infra/3pp/tools/go/${{platform}}',
173 'version': Var('dawn_go_version'),
174 }],
175 'dep_type': 'cipd',
176 },
177
178 'tools/cmake': {
179 'condition': 'dawn_node and (host_os == "mac" or host_os == "linux")',
180 'packages': [{
181 'package': 'infra/3pp/tools/cmake/${{platform}}',
182 'version': Var('dawn_cmake_version'),
183 }],
184 'dep_type': 'cipd',
185 },
Corentin Wallez21a23852018-07-31 18:50:03 +0200186}
187
188hooks = [
Corentin Wallez21a23852018-07-31 18:50:03 +0200189 # Pull the compilers and system libraries for hermetic builds
190 {
191 'name': 'sysroot_x86',
192 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000193 'condition': 'dawn_standalone and checkout_linux and (checkout_x86 or checkout_x64)',
Corentin Wallezd5203662022-01-05 15:54:08 +0000194 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200195 '--arch=x86'],
196 },
197 {
198 'name': 'sysroot_x64',
199 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000200 'condition': 'dawn_standalone and checkout_linux and checkout_x64',
Corentin Wallezd5203662022-01-05 15:54:08 +0000201 'action': ['python3', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200202 '--arch=x64'],
203 },
204 {
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000205 # Update the Mac toolchain if possible, this makes builders use "hermetic XCode" which is
206 # is more consistent (only changes when rolling build/) and is cached.
207 'name': 'mac_toolchain',
208 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000209 'condition': 'dawn_standalone and checkout_mac',
Corentin Wallezd5203662022-01-05 15:54:08 +0000210 'action': ['python3', 'build/mac_toolchain.py'],
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000211 },
212 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200213 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200214 'name': 'win_toolchain',
215 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000216 'condition': 'dawn_standalone and checkout_win',
Corentin Wallezd5203662022-01-05 15:54:08 +0000217 'action': ['python3', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200218 },
219 {
220 # Note: On Win, this should run after win_toolchain, as it may use it.
221 'name': 'clang',
222 'pattern': '.',
Corentin Wallezd5203662022-01-05 15:54:08 +0000223 'action': ['python3', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200224 'condition': 'dawn_standalone',
225 },
226 {
227 # Pull rc binaries using checked-in hashes.
228 'name': 'rc_win',
229 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000230 'condition': 'dawn_standalone and checkout_win and host_os == "win"',
Corentin Wallez21a23852018-07-31 18:50:03 +0200231 'action': [ 'download_from_google_storage',
232 '--no_resume',
233 '--no_auth',
234 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200235 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200236 ],
237 },
Corentin Wallez131e6192020-11-03 18:18:06 +0000238 # Pull clang-format binaries using checked-in hashes.
239 {
240 'name': 'clang_format_win',
241 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000242 'condition': 'dawn_standalone and host_os == "win"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000243 'action': [ 'download_from_google_storage',
244 '--no_resume',
245 '--no_auth',
246 '--bucket', 'chromium-clang-format',
247 '-s', 'buildtools/win/clang-format.exe.sha1',
248 ],
249 },
250 {
251 'name': 'clang_format_mac',
252 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000253 'condition': 'dawn_standalone and host_os == "mac"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000254 'action': [ 'download_from_google_storage',
255 '--no_resume',
256 '--no_auth',
257 '--bucket', 'chromium-clang-format',
258 '-s', 'buildtools/mac/clang-format.sha1',
259 ],
260 },
261 {
262 'name': 'clang_format_linux',
263 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000264 'condition': 'dawn_standalone and host_os == "linux"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000265 'action': [ 'download_from_google_storage',
266 '--no_resume',
267 '--no_auth',
268 '--bucket', 'chromium-clang-format',
269 '-s', 'buildtools/linux64/clang-format.sha1',
270 ],
271 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000272 # Update build/util/LASTCHANGE.
273 {
274 'name': 'lastchange',
275 'pattern': '.',
Jiajie Hu2ffc55a2020-07-01 05:08:36 +0000276 'condition': 'dawn_standalone',
Corentin Wallezd5203662022-01-05 15:54:08 +0000277 'action': ['python3', 'build/util/lastchange.py',
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000278 '-o', 'build/util/LASTCHANGE'],
279 },
Austin Eng4948c812021-10-15 14:28:32 +0000280 # TODO(https://crbug.com/1180257): Use CIPD for CMake on Windows.
281 {
282 'name': 'cmake_win32',
283 'pattern': '.',
284 'condition': 'dawn_node and host_os == "win"',
285 'action': [ 'download_from_google_storage',
286 '--no_resume',
287 '--platform=win32',
288 '--no_auth',
289 '--bucket', 'chromium-tools',
290 Var('dawn_cmake_win32_sha1'),
291 '-o', 'tools/cmake-win32.zip'
292 ],
293 },
294 {
295 'name': 'cmake_win32_extract',
296 'pattern': '.',
297 'condition': 'dawn_node and host_os == "win"',
Corentin Wallezd5203662022-01-05 15:54:08 +0000298 'action': [ 'python3',
Austin Eng4948c812021-10-15 14:28:32 +0000299 'scripts/extract.py',
300 'tools/cmake-win32.zip',
301 'tools/cmake-win32/',
302 ],
303 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200304]
305
306recursedeps = [
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000307 'third_party/vulkan-deps',
Corentin Wallez21a23852018-07-31 18:50:03 +0200308]