• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1use_relative_paths = True
2
3gclient_gn_args_file = 'build/config/gclient_args.gni'
4
5vars = {
6  'chromium_git': 'https://chromium.googlesource.com',
7  'dawn_git': 'https://dawn.googlesource.com',
8  'github_git': 'https://github.com',
9  'swiftshader_git': 'https://swiftshader.googlesource.com',
10
11  'dawn_standalone': True,
12  'dawn_node': False, # Also fetches dependencies required for building NodeJS bindings.
13  'dawn_cmake_version': 'version:3.13.5',
14  'dawn_cmake_win32_sha1': 'b106d66bcdc8a71ea2cdf5446091327bfdb1bcd7',
15  'dawn_go_version': 'version:1.16',
16}
17
18deps = {
19  # Dependencies required to use GN/Clang in standalone
20  'build': {
21    'url': '{chromium_git}/chromium/src/build@0ff4b3d4eeb6d480c716b432a9a93a58c42150d5',
22    'condition': 'dawn_standalone',
23  },
24  'buildtools': {
25    'url': '{chromium_git}/chromium/src/buildtools@9c143ace7560797fed136da85e22ea4834e6b147',
26    'condition': 'dawn_standalone',
27  },
28  'buildtools/clang_format/script': {
29    'url': '{chromium_git}/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@99803d74e35962f63a775f29477882afd4d57d94',
30    'condition': 'dawn_standalone',
31  },
32
33  'buildtools/linux64': {
34    'packages': [{
35      'package': 'gn/gn/linux-amd64',
36      'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
37    }],
38    'dep_type': 'cipd',
39    'condition': 'dawn_standalone and host_os == "linux"',
40  },
41  'buildtools/mac': {
42    'packages': [{
43      'package': 'gn/gn/mac-${{arch}}',
44      'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
45    }],
46    'dep_type': 'cipd',
47    'condition': 'dawn_standalone and host_os == "mac"',
48  },
49  'buildtools/win': {
50    'packages': [{
51      'package': 'gn/gn/windows-amd64',
52      'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
53    }],
54    'dep_type': 'cipd',
55    'condition': 'dawn_standalone and host_os == "win"',
56  },
57
58  'buildtools/third_party/libc++/trunk': {
59    'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@8fa87946779682841e21e2da977eccfb6cb3bded',
60    'condition': 'dawn_standalone',
61  },
62
63  'buildtools/third_party/libc++abi/trunk': {
64    'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@f4328ad7c0d8242d36cb5bea530925f9fea34248',
65    'condition': 'dawn_standalone',
66  },
67
68  'tools/clang': {
69    'url': '{chromium_git}/chromium/src/tools/clang@03ff857f12277f511e0a30aca44b80e8aaebafd7',
70    'condition': 'dawn_standalone',
71  },
72  'tools/clang/dsymutil': {
73    'packages': [{
74      'package': 'chromium/llvm-build-tools/dsymutil',
75      'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
76    }],
77    'condition': 'dawn_standalone and (checkout_mac or checkout_ios)',
78    'dep_type': 'cipd',
79  },
80
81  # Testing, GTest and GMock
82  'testing': {
83    'url': '{chromium_git}/chromium/src/testing@3e2640a325dc34ec3d9cb2802b8da874aecaf52d',
84    'condition': 'dawn_standalone',
85  },
86  'third_party/googletest': {
87    'url': '{chromium_git}/external/github.com/google/googletest@2828773179fa425ee406df61890a150577178ea2',
88    'condition': 'dawn_standalone',
89  },
90
91  # Jinja2 and MarkupSafe for the code generator
92  'third_party/jinja2': {
93    'url': '{chromium_git}/chromium/src/third_party/jinja2@ee69aa00ee8536f61db6a451f3858745cf587de6',
94    'condition': 'dawn_standalone',
95  },
96  'third_party/markupsafe': {
97    'url': '{chromium_git}/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a',
98    'condition': 'dawn_standalone',
99  },
100
101  # WGSL support
102  'third_party/tint': {
103    'url': '{dawn_git}/tint@0fe30b52a5c93473923419d0043840d61ca46746',
104  },
105
106  # GLFW for tests and samples
107  'third_party/glfw': {
108    'url': '{chromium_git}/external/github.com/glfw/glfw@94773111300fee0453844a4c9407af7e880b4df8',
109    'condition': 'dawn_standalone',
110  },
111
112  # Dependencies for samples: GLM
113  'third_party/glm': {
114    'url': '{github_git}/g-truc/glm.git@bf71a834948186f4097caa076cd2663c69a10e1e',
115    'condition': 'dawn_standalone',
116  },
117
118  'third_party/vulkan_memory_allocator': {
119    'url': '{chromium_git}/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@1ecb35c39875c77219c75ecb5c5b3316020f66b8',
120    'condition': 'dawn_standalone',
121  },
122
123  'third_party/angle': {
124    'url': '{chromium_git}/angle/angle@663831aa676c59829cc3d822340812f016bf77f6',
125    'condition': 'dawn_standalone',
126  },
127
128  'third_party/swiftshader': {
129    'url': '{swiftshader_git}/SwiftShader@562df4889b8140479d1429e67391f80025493e94',
130    'condition': 'dawn_standalone',
131  },
132
133  'third_party/vulkan-deps': {
134    'url': '{chromium_git}/vulkan-deps@d74e02442e56681f44548a549a41d9c76c34ddf4',
135    'condition': 'dawn_standalone',
136  },
137
138  'third_party/zlib': {
139    'url': '{chromium_git}/chromium/src/third_party/zlib@c29ee8c9c3824ca013479bf8115035527967fe02',
140    'condition': 'dawn_standalone',
141  },
142
143  'third_party/abseil-cpp': {
144    'url': '{chromium_git}/chromium/src/third_party/abseil-cpp@789af048b388657987c59d4da406859034fe310f',
145    'condition': 'dawn_standalone',
146  },
147
148  # Dependencies required to build Dawn NodeJS bindings
149  'third_party/node-api-headers': {
150    'url': '{github_git}/nodejs/node-api-headers.git@d68505e4055ecb630e14c26c32e5c2c65e179bba',
151    'condition': 'dawn_node',
152  },
153  'third_party/node-addon-api': {
154    'url': '{github_git}/nodejs/node-addon-api.git@4a3de56c3e4ed0031635a2f642b27efeeed00add',
155    'condition': 'dawn_node',
156  },
157  'third_party/gpuweb': {
158    'url': '{github_git}/gpuweb/gpuweb.git@67edc187f5305a72456663c34d51153601b79f3b',
159    'condition': 'dawn_node',
160  },
161
162  'tools/golang': {
163    'condition': 'dawn_node',
164    'packages': [{
165      'package': 'infra/3pp/tools/go/${{platform}}',
166      'version': Var('dawn_go_version'),
167    }],
168    'dep_type': 'cipd',
169  },
170
171  'tools/cmake': {
172    'condition': 'dawn_node and (host_os == "mac" or host_os == "linux")',
173    'packages': [{
174      'package': 'infra/3pp/tools/cmake/${{platform}}',
175      'version': Var('dawn_cmake_version'),
176    }],
177    'dep_type': 'cipd',
178  },
179}
180
181hooks = [
182  # Pull the compilers and system libraries for hermetic builds
183  {
184    'name': 'sysroot_x86',
185    'pattern': '.',
186    'condition': 'dawn_standalone and checkout_linux and (checkout_x86 or checkout_x64)',
187    'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
188               '--arch=x86'],
189  },
190  {
191    'name': 'sysroot_x64',
192    'pattern': '.',
193    'condition': 'dawn_standalone and checkout_linux and checkout_x64',
194    'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
195               '--arch=x64'],
196  },
197  {
198    # Update the Mac toolchain if possible, this makes builders use "hermetic XCode" which is
199    # is more consistent (only changes when rolling build/) and is cached.
200    'name': 'mac_toolchain',
201    'pattern': '.',
202    'condition': 'dawn_standalone and checkout_mac',
203    'action': ['python', 'build/mac_toolchain.py'],
204  },
205  {
206    # Update the Windows toolchain if necessary. Must run before 'clang' below.
207    'name': 'win_toolchain',
208    'pattern': '.',
209    'condition': 'dawn_standalone and checkout_win',
210    'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
211  },
212  {
213    # Note: On Win, this should run after win_toolchain, as it may use it.
214    'name': 'clang',
215    'pattern': '.',
216    'action': ['python', 'tools/clang/scripts/update.py'],
217    'condition': 'dawn_standalone',
218  },
219  {
220    # Pull rc binaries using checked-in hashes.
221    'name': 'rc_win',
222    'pattern': '.',
223    'condition': 'dawn_standalone and checkout_win and host_os == "win"',
224    'action': [ 'download_from_google_storage',
225                '--no_resume',
226                '--no_auth',
227                '--bucket', 'chromium-browser-clang/rc',
228                '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
229    ],
230  },
231  # Pull clang-format binaries using checked-in hashes.
232  {
233    'name': 'clang_format_win',
234    'pattern': '.',
235    'condition': 'dawn_standalone and host_os == "win"',
236    'action': [ 'download_from_google_storage',
237                '--no_resume',
238                '--no_auth',
239                '--bucket', 'chromium-clang-format',
240                '-s', 'buildtools/win/clang-format.exe.sha1',
241    ],
242  },
243  {
244    'name': 'clang_format_mac',
245    'pattern': '.',
246    'condition': 'dawn_standalone and host_os == "mac"',
247    'action': [ 'download_from_google_storage',
248                '--no_resume',
249                '--no_auth',
250                '--bucket', 'chromium-clang-format',
251                '-s', 'buildtools/mac/clang-format.sha1',
252    ],
253  },
254  {
255    'name': 'clang_format_linux',
256    'pattern': '.',
257    'condition': 'dawn_standalone and host_os == "linux"',
258    'action': [ 'download_from_google_storage',
259                '--no_resume',
260                '--no_auth',
261                '--bucket', 'chromium-clang-format',
262                '-s', 'buildtools/linux64/clang-format.sha1',
263    ],
264  },
265  # Update build/util/LASTCHANGE.
266  {
267    'name': 'lastchange',
268    'pattern': '.',
269    'condition': 'dawn_standalone',
270    'action': ['python', 'build/util/lastchange.py',
271               '-o', 'build/util/LASTCHANGE'],
272  },
273  # TODO(https://crbug.com/1180257): Use CIPD for CMake on Windows.
274  {
275    'name': 'cmake_win32',
276    'pattern': '.',
277    'condition': 'dawn_node and host_os == "win"',
278    'action': [ 'download_from_google_storage',
279                '--no_resume',
280                '--platform=win32',
281                '--no_auth',
282                '--bucket', 'chromium-tools',
283                Var('dawn_cmake_win32_sha1'),
284                '-o', 'tools/cmake-win32.zip'
285    ],
286  },
287  {
288    'name': 'cmake_win32_extract',
289    'pattern': '.',
290    'condition': 'dawn_node and host_os == "win"',
291    'action': [ 'python',
292                'scripts/extract.py',
293                'tools/cmake-win32.zip',
294                'tools/cmake-win32/',
295    ],
296  },
297]
298
299recursedeps = [
300  'third_party/vulkan-deps',
301]
302