blob: 2c027dd35eda20f0452e7221d93851df9ab134e0 [file] [log] [blame]
Corentin Wallez1a0596d2018-09-10 15:16:10 +02001use_relative_paths = True
2use_relative_hooks = True
3
Corentin Wallez21a23852018-07-31 18:50:03 +02004vars = {
5 'chromium_git': 'https://chromium.googlesource.com',
Corentin Wallez4c351012018-08-27 10:10:28 +02006 'dawn_git': 'https://dawn.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +02007 'github_git': 'https://github.com',
Corentin Wallez74cebd62019-11-26 18:21:51 +00008 'swiftshader_git': 'https://swiftshader.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +02009
Corentin Wallez21a23852018-07-31 18:50:03 +020010 'dawn_standalone': True,
11}
12
13deps = {
14 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020015 'build': {
Corentin Wallez15b95312020-04-15 19:58:17 +000016 'url': '{chromium_git}/chromium/src/build@896323eeda1bd1b01156b70625d5e14de225ebc3',
Corentin Wallez21a23852018-07-31 18:50:03 +020017 'condition': 'dawn_standalone',
18 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020019 'buildtools': {
Corentin Wallez15b95312020-04-15 19:58:17 +000020 'url': '{chromium_git}/chromium/src/buildtools@2c41dfb19abe40908834803b6fed797b0f341fe1',
Corentin Wallez21a23852018-07-31 18:50:03 +020021 'condition': 'dawn_standalone',
22 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020023 'tools/clang': {
Corentin Wallez15b95312020-04-15 19:58:17 +000024 'url': '{chromium_git}/chromium/src/tools/clang@698732d5db36040c07d5cc5f9137fcc943494c11',
Corentin Wallezca81bd32018-09-03 11:55:58 +020025 'condition': 'dawn_standalone',
26 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020027 'third_party/binutils': {
Corentin Wallez15b95312020-04-15 19:58:17 +000028 'url': '{chromium_git}/chromium/src/third_party/binutils@f9ce777698a819dff4d6a033b31122d91a49b62e',
Corentin Wallez21a23852018-07-31 18:50:03 +020029 'condition': 'dawn_standalone',
30 },
Kai Ninomiyaf526d772020-04-06 22:27:02 +000031 'tools/clang/dsymutil': {
32 'packages': [
33 {
34 'package': 'chromium/llvm-build-tools/dsymutil',
35 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
36 }
37 ],
38 'condition': 'checkout_mac or checkout_ios',
39 'dep_type': 'cipd',
40 },
Corentin Wallez21a23852018-07-31 18:50:03 +020041
Corentin Wallez649e2fe2018-08-03 15:57:43 +020042 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020043 'testing': {
Victor Costan0721c1c2020-04-15 20:06:27 +000044 'url': '{chromium_git}/chromium/src/testing@e5ced5141379ee8ae28b4f93d3c02df039d2b052',
Corentin Wallez21a23852018-07-31 18:50:03 +020045 'condition': 'dawn_standalone',
46 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020047 'third_party/googletest': {
Victor Costan0721c1c2020-04-15 20:06:27 +000048 'url': '{chromium_git}/external/github.com/google/googletest@e3f0319d89f4cbf32993de595d984183b1a9fc57',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020049 'condition': 'dawn_standalone',
50 },
Corentin Wallez21a23852018-07-31 18:50:03 +020051
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020052 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020053 'third_party/jinja2': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020054 'url': '{chromium_git}/chromium/src/third_party/jinja2@b41863e42637544c2941b574c7877d3e1f663e25',
55 'condition': 'dawn_standalone',
56 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020057 'third_party/markupsafe': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020058 'url': '{chromium_git}/chromium/src/third_party/markupsafe@8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
59 'condition': 'dawn_standalone',
60 },
61
Corentin Wallez21a23852018-07-31 18:50:03 +020062 # SPIRV-Cross
Corentin Wallez1a0596d2018-09-10 15:16:10 +020063 'third_party/spirv-cross': {
Ryan Harrisonbeaaa5a2020-04-14 18:40:34 +000064 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@54658d62559a364319cb222afe826d0d68c55ad0',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020065 'condition': 'dawn_standalone',
Corentin Wallez21a23852018-07-31 18:50:03 +020066 },
Corentin Wallez649e2fe2018-08-03 15:57:43 +020067
68 # SPIRV compiler dependencies: SPIRV-Tools, SPIRV-headers, glslang and shaderc
Corentin Wallez1a0596d2018-09-10 15:16:10 +020069 'third_party/SPIRV-Tools': {
Corentin Wallez3d9fe4a2020-04-15 19:04:17 +000070 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@61b7de3c39f01a0eeb717f444c86990547752e26',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020071 'condition': 'dawn_standalone',
72 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020073 'third_party/spirv-headers': {
Ryan Harrisonbeaaa5a2020-04-14 18:40:34 +000074 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@2ad0492fb00919d99500f1da74abf5ad3c870e4e',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020075 'condition': 'dawn_standalone',
76 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020077 'third_party/glslang': {
Ryan Harrisonbeaaa5a2020-04-14 18:40:34 +000078 'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@4d2298bfd78a82f77f2325c4ade096ccdab1f00d',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020079 'condition': 'dawn_standalone',
80 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020081 'third_party/shaderc': {
Ryan Harrisonbeaaa5a2020-04-14 18:40:34 +000082 'url': '{chromium_git}/external/github.com/google/shaderc@1926de0638b6dd74b759293a5bd21c473d0b1ade',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020083 'condition': 'dawn_standalone',
84 },
85
Corentin Wallez4d7d1692018-08-13 08:23:27 +020086 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +020087 'third_party/glfw': {
Corentin Walleza5a6e4f2020-01-23 15:10:58 +000088 'url': '{chromium_git}/external/github.com/glfw/glfw@d973acc123826666ecc9e6fd475682e3d84c54a6',
Corentin Wallez4d7d1692018-08-13 08:23:27 +020089 'condition': 'dawn_standalone',
90 },
91
Austin Engf3f5bf42019-05-18 03:14:46 +000092 # Dependencies for samples: GLM
Corentin Wallez1a0596d2018-09-10 15:16:10 +020093 'third_party/glm': {
Zhenyao Mo37193aa2020-04-14 16:20:14 +000094 'url': '{github_git}/g-truc/glm.git@bf71a834948186f4097caa076cd2663c69a10e1e',
Corentin Wallez4d7d1692018-08-13 08:23:27 +020095 'condition': 'dawn_standalone',
96 },
Corentin Wallez4c351012018-08-27 10:10:28 +020097
98 # Our own pre-compiled Linux clang-format 7.0 for presubmit
99 'third_party/clang-format': {
100 'url': '{dawn_git}/clang-format@2451c56cd368676cdb230fd5ad11731ab859f1a3',
101 'condition': 'dawn_standalone and checkout_linux',
102 },
Li, Hao0e1bef32019-11-07 12:13:27 +0000103
Corentin Wallez09257202020-04-17 08:22:25 +0000104 # Khronos Vulkan headers, validation layers and loader.
Li, Hao0e1bef32019-11-07 12:13:27 +0000105 'third_party/vulkan-headers': {
Corentin Wallez955f8a32020-04-16 17:24:16 +0000106 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Headers@e01f13e1f777cf592ebd1a5f4836d4cd10ed85f6',
Li, Hao0e1bef32019-11-07 12:13:27 +0000107 'condition': 'dawn_standalone',
108 },
Li, Hao0e1bef32019-11-07 12:13:27 +0000109 'third_party/vulkan-validation-layers': {
Corentin Wallez955f8a32020-04-16 17:24:16 +0000110 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@1533266eac486fae0c34bffe4868c4bc91dbe078',
Li, Hao0e1bef32019-11-07 12:13:27 +0000111 'condition': 'dawn_standalone',
112 },
Corentin Wallez09257202020-04-17 08:22:25 +0000113 'third_party/vulkan-loader': {
114 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Loader@3f7e3cbf33a732e945b3780212aad853ca0add29',
115 'condition': 'dawn_standalone',
116 },
Corentin Wallez74cebd62019-11-26 18:21:51 +0000117
118 'third_party/swiftshader': {
Corentin Wallezc08a0d42020-04-08 16:01:22 +0000119 'url': '{swiftshader_git}/SwiftShader@63ed0e445fa525ee01637350ea92fbdaa2226c73',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000120 'condition': 'dawn_standalone',
121 },
122
Corentin Wallez21a23852018-07-31 18:50:03 +0200123}
124
125hooks = [
126 # Pull clang-format binaries using checked-in hashes.
127 {
128 'name': 'clang_format_win',
129 'pattern': '.',
130 'condition': 'host_os == "win" and dawn_standalone',
131 'action': [ 'download_from_google_storage',
132 '--no_resume',
133 '--platform=win32',
134 '--no_auth',
135 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200136 '-s', 'buildtools/win/clang-format.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200137 ],
138 },
139 {
140 'name': 'clang_format_mac',
141 'pattern': '.',
142 'condition': 'host_os == "mac" and dawn_standalone',
143 'action': [ 'download_from_google_storage',
144 '--no_resume',
145 '--platform=darwin',
146 '--no_auth',
147 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200148 '-s', 'buildtools/mac/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200149 ],
150 },
151 {
152 'name': 'clang_format_linux',
153 'pattern': '.',
154 'condition': 'host_os == "linux" and dawn_standalone',
155 'action': [ 'download_from_google_storage',
156 '--no_resume',
157 '--platform=linux*',
158 '--no_auth',
159 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200160 '-s', 'buildtools/linux64/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200161 ],
162 },
163
Corentin Wallez21a23852018-07-31 18:50:03 +0200164 # Pull the compilers and system libraries for hermetic builds
165 {
166 'name': 'sysroot_x86',
167 'pattern': '.',
168 'condition': 'checkout_linux and ((checkout_x86 or checkout_x64) and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200169 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200170 '--arch=x86'],
171 },
172 {
173 'name': 'sysroot_x64',
174 'pattern': '.',
175 'condition': 'checkout_linux and (checkout_x64 and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200176 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200177 '--arch=x64'],
178 },
179 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200180 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200181 'name': 'win_toolchain',
182 'pattern': '.',
183 'condition': 'checkout_win and dawn_standalone',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200184 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200185 },
186 {
187 # Note: On Win, this should run after win_toolchain, as it may use it.
188 'name': 'clang',
189 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200190 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200191 'condition': 'dawn_standalone',
192 },
193 {
194 # Pull rc binaries using checked-in hashes.
195 'name': 'rc_win',
196 'pattern': '.',
197 'condition': 'checkout_win and (host_os == "win" and dawn_standalone)',
198 'action': [ 'download_from_google_storage',
199 '--no_resume',
200 '--no_auth',
201 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200202 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200203 ],
204 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200205 # Pull binutils for linux hermetic builds
206 {
207 'name': 'binutils',
208 'pattern': 'src/third_party/binutils',
209 'condition': 'host_os == "linux"',
210 'action': [
211 'python',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200212 'third_party/binutils/download.py',
Corentin Wallezca81bd32018-09-03 11:55:58 +0200213 ],
214 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000215 # Update build/util/LASTCHANGE.
216 {
217 'name': 'lastchange',
218 'pattern': '.',
219 'action': ['python', 'build/util/lastchange.py',
220 '-o', 'build/util/LASTCHANGE'],
221 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200222]
223
224recursedeps = [
225 # buildtools provides clang_format, libc++, and libc++abi
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200226 'buildtools',
Corentin Wallez21a23852018-07-31 18:50:03 +0200227]