blob: 3ed1399d08e80e98f0c242e70aa3261ad85bd52b [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,
12}
13
14deps = {
15 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020016 'build': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000017 'url': '{chromium_git}/chromium/src/build@ea192b29d26f84e94910791c1eeb89d24c063dd0',
Corentin Wallez21a23852018-07-31 18:50:03 +020018 'condition': 'dawn_standalone',
19 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020020 'buildtools': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000021 'url': '{chromium_git}/chromium/src/buildtools@69cc9b8a3ae010e0721c4bea12de7a352d9a93f9',
Corentin Wallez21a23852018-07-31 18:50:03 +020022 'condition': 'dawn_standalone',
23 },
Corentin Wallez60ca94b2021-03-24 16:22:32 +000024 'buildtools/clang_format/script': {
25 'url': '{chromium_git}/external/github.com/llvm/llvm-project/clang/tools/clang-format.git@99803d74e35962f63a775f29477882afd4d57d94',
26 'condition': 'dawn_standalone',
27 },
28
29 'buildtools/linux64': {
30 'packages': [{
31 'package': 'gn/gn/linux-amd64',
32 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
33 }],
34 'dep_type': 'cipd',
35 'condition': 'dawn_standalone and host_os == "linux"',
36 },
37 'buildtools/mac': {
38 'packages': [{
39 'package': 'gn/gn/mac-${{arch}}',
40 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
41 }],
42 'dep_type': 'cipd',
43 'condition': 'dawn_standalone and host_os == "mac"',
44 },
45 'buildtools/win': {
46 'packages': [{
47 'package': 'gn/gn/windows-amd64',
48 'version': 'git_revision:dfcbc6fed0a8352696f92d67ccad54048ad182b3',
49 }],
50 'dep_type': 'cipd',
51 'condition': 'dawn_standalone and host_os == "win"',
52 },
53
54 'buildtools/third_party/libc++/trunk': {
55 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxx.git@8fa87946779682841e21e2da977eccfb6cb3bded',
56 'condition': 'dawn_standalone',
57 },
58
59 'buildtools/third_party/libc++abi/trunk': {
60 'url': '{chromium_git}/external/github.com/llvm/llvm-project/libcxxabi.git@6918862bfc2bff22b45058fac22b1596c49982fb',
61 'condition': 'dawn_standalone',
62 },
63
Corentin Wallez1a0596d2018-09-10 15:16:10 +020064 'tools/clang': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000065 'url': '{chromium_git}/chromium/src/tools/clang@24cecabb89512de31a1083308b237420651a835c',
Corentin Wallez21a23852018-07-31 18:50:03 +020066 'condition': 'dawn_standalone',
67 },
Kai Ninomiyaf526d772020-04-06 22:27:02 +000068 'tools/clang/dsymutil': {
Corentin Wallez60ca94b2021-03-24 16:22:32 +000069 'packages': [{
70 'package': 'chromium/llvm-build-tools/dsymutil',
71 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
72 }],
Corentin Wallez2015b2f2021-03-04 17:37:55 +000073 'condition': 'dawn_standalone and (checkout_mac or checkout_ios)',
Kai Ninomiyaf526d772020-04-06 22:27:02 +000074 'dep_type': 'cipd',
75 },
Corentin Wallez21a23852018-07-31 18:50:03 +020076
Corentin Wallez649e2fe2018-08-03 15:57:43 +020077 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020078 'testing': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000079 'url': '{chromium_git}/chromium/src/testing@3e2640a325dc34ec3d9cb2802b8da874aecaf52d',
Corentin Wallez21a23852018-07-31 18:50:03 +020080 'condition': 'dawn_standalone',
81 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020082 'third_party/googletest': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000083 'url': '{chromium_git}/external/github.com/google/googletest@2828773179fa425ee406df61890a150577178ea2',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020084 'condition': 'dawn_standalone',
85 },
Corentin Wallez21a23852018-07-31 18:50:03 +020086
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020087 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020088 'third_party/jinja2': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000089 'url': '{chromium_git}/chromium/src/third_party/jinja2@a82a4944a7f2496639f34a89c9923be5908b80aa',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020090 'condition': 'dawn_standalone',
91 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020092 'third_party/markupsafe': {
Corentin Wallezbf1e9532020-11-04 09:44:47 +000093 'url': '{chromium_git}/chromium/src/third_party/markupsafe@0944e71f4b2cb9a871bcbe353f95e889b64a611a',
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020094 'condition': 'dawn_standalone',
95 },
96
Ryan Harrison991b9472020-05-06 23:15:54 +000097 # WGSL support
98 'third_party/tint': {
Dawn Autoroller7f7f8132021-05-27 15:13:43 +000099 'url': '{dawn_git}/tint@5102f87e38e0092828664b0208e5398781e8686e',
Ryan Harrison991b9472020-05-06 23:15:54 +0000100 },
101
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200102 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200103 'third_party/glfw': {
Stephen White3aa929b2021-02-03 19:22:47 +0000104 'url': '{chromium_git}/external/github.com/glfw/glfw@94773111300fee0453844a4c9407af7e880b4df8',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200105 'condition': 'dawn_standalone',
106 },
107
Austin Engf3f5bf42019-05-18 03:14:46 +0000108 # Dependencies for samples: GLM
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200109 'third_party/glm': {
Zhenyao Mo37193aa2020-04-14 16:20:14 +0000110 'url': '{github_git}/g-truc/glm.git@bf71a834948186f4097caa076cd2663c69a10e1e',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200111 'condition': 'dawn_standalone',
112 },
Corentin Wallez4c351012018-08-27 10:10:28 +0200113
Stephen White77fcdf72021-01-11 15:52:12 +0000114 'third_party/vulkan_memory_allocator': {
Corentin Wallezc6a38762021-04-06 16:10:49 +0000115 'url': '{chromium_git}/external/github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator@1ecb35c39875c77219c75ecb5c5b3316020f66b8',
Stephen White77fcdf72021-01-11 15:52:12 +0000116 'condition': 'dawn_standalone',
117 },
118
119 'third_party/angle': {
Corentin Wallez8507f7e2021-05-18 16:01:03 +0000120 'url': '{chromium_git}/angle/angle@835bcb1e27f12cd55bbbdfb0cca2479f7f4b51de',
Stephen White77fcdf72021-01-11 15:52:12 +0000121 'condition': 'dawn_standalone',
122 },
123
Corentin Wallez74cebd62019-11-26 18:21:51 +0000124 'third_party/swiftshader': {
Corentin Wallez6298b632020-10-19 18:35:39 +0000125 'url': '{swiftshader_git}/SwiftShader@df17a76102dfabb3f1bd6e51449cece9f77b45e3',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000126 'condition': 'dawn_standalone',
127 },
128
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000129 'third_party/vulkan-deps': {
Corentin Wallez8507f7e2021-05-18 16:01:03 +0000130 'url': '{chromium_git}/vulkan-deps@3d799e0e9b08dc14a3efa2e130d288f6ca33d3d0',
Corentin Wallez1fdd0592021-04-02 18:04:27 +0000131 'condition': 'dawn_standalone',
Stephen White77fcdf72021-01-11 15:52:12 +0000132 },
133
134 'third_party/zlib': {
135 'url': '{chromium_git}/chromium/src/third_party/zlib@c29ee8c9c3824ca013479bf8115035527967fe02',
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000136 'condition': 'dawn_standalone',
137 },
Corentin Wallez21a23852018-07-31 18:50:03 +0200138}
139
140hooks = [
Corentin Wallez21a23852018-07-31 18:50:03 +0200141 # Pull the compilers and system libraries for hermetic builds
142 {
143 'name': 'sysroot_x86',
144 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000145 'condition': 'dawn_standalone and checkout_linux and (checkout_x86 or checkout_x64)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200146 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200147 '--arch=x86'],
148 },
149 {
150 'name': 'sysroot_x64',
151 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000152 'condition': 'dawn_standalone and checkout_linux and checkout_x64',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200153 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200154 '--arch=x64'],
155 },
156 {
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000157 # Update the Mac toolchain if possible, this makes builders use "hermetic XCode" which is
158 # is more consistent (only changes when rolling build/) and is cached.
159 'name': 'mac_toolchain',
160 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000161 'condition': 'dawn_standalone and checkout_mac',
Corentin Wallezd4e7f082020-11-17 21:16:31 +0000162 'action': ['python', 'build/mac_toolchain.py'],
163 },
164 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200165 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200166 'name': 'win_toolchain',
167 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000168 'condition': 'dawn_standalone and checkout_win',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200169 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200170 },
171 {
172 # Note: On Win, this should run after win_toolchain, as it may use it.
173 'name': 'clang',
174 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200175 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200176 'condition': 'dawn_standalone',
177 },
178 {
179 # Pull rc binaries using checked-in hashes.
180 'name': 'rc_win',
181 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000182 'condition': 'dawn_standalone and checkout_win and host_os == "win"',
Corentin Wallez21a23852018-07-31 18:50:03 +0200183 'action': [ 'download_from_google_storage',
184 '--no_resume',
185 '--no_auth',
186 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200187 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200188 ],
189 },
Corentin Wallez131e6192020-11-03 18:18:06 +0000190 # Pull clang-format binaries using checked-in hashes.
191 {
192 'name': 'clang_format_win',
193 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000194 'condition': 'dawn_standalone and host_os == "win"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000195 'action': [ 'download_from_google_storage',
196 '--no_resume',
197 '--no_auth',
198 '--bucket', 'chromium-clang-format',
199 '-s', 'buildtools/win/clang-format.exe.sha1',
200 ],
201 },
202 {
203 'name': 'clang_format_mac',
204 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000205 'condition': 'dawn_standalone and host_os == "mac"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000206 'action': [ 'download_from_google_storage',
207 '--no_resume',
208 '--no_auth',
209 '--bucket', 'chromium-clang-format',
210 '-s', 'buildtools/mac/clang-format.sha1',
211 ],
212 },
213 {
214 'name': 'clang_format_linux',
215 'pattern': '.',
Corentin Wallez2015b2f2021-03-04 17:37:55 +0000216 'condition': 'dawn_standalone and host_os == "linux"',
Corentin Wallez131e6192020-11-03 18:18:06 +0000217 'action': [ 'download_from_google_storage',
218 '--no_resume',
219 '--no_auth',
220 '--bucket', 'chromium-clang-format',
221 '-s', 'buildtools/linux64/clang-format.sha1',
222 ],
223 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000224 # Update build/util/LASTCHANGE.
225 {
226 'name': 'lastchange',
227 'pattern': '.',
Jiajie Hu2ffc55a2020-07-01 05:08:36 +0000228 'condition': 'dawn_standalone',
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000229 'action': ['python', 'build/util/lastchange.py',
230 '-o', 'build/util/LASTCHANGE'],
231 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200232]
233
234recursedeps = [
Stephen Whitef1fa60b2021-01-06 17:41:50 +0000235 'third_party/vulkan-deps',
Corentin Wallez21a23852018-07-31 18:50:03 +0200236]