blob: 47032d379c883c1c6eff157d195b0c2dd1098c5a [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': {
Robert Iannucciebb05392019-08-09 01:40:38 +000016 'url': '{chromium_git}/chromium/src/build@f3d0ca5f46b7b190dbbdc6be508ca11dd5c54302',
Corentin Wallez21a23852018-07-31 18:50:03 +020017 'condition': 'dawn_standalone',
18 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020019 'buildtools': {
Robert Iannucciebb05392019-08-09 01:40:38 +000020 'url': '{chromium_git}/chromium/src/buildtools@74cfb57006f83cfe050817526db359d5c8a11628',
Corentin Wallez21a23852018-07-31 18:50:03 +020021 'condition': 'dawn_standalone',
22 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020023 'tools/clang': {
Robert Iannucciebb05392019-08-09 01:40:38 +000024 'url': '{chromium_git}/chromium/src/tools/clang@3605577b67603ec5776afcfada9e0ff4ea05cf0e',
Corentin Wallezca81bd32018-09-03 11:55:58 +020025 'condition': 'dawn_standalone',
26 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020027 'third_party/binutils': {
Robert Iannucciebb05392019-08-09 01:40:38 +000028 'url': '{chromium_git}/chromium/src/third_party/binutils@01aa7745b0bab64ae22600f09fd6483c60f22ebf',
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': {
Robert Iannucciebb05392019-08-09 01:40:38 +000044 'url': '{chromium_git}/chromium/src/testing@2ffbbb3c8e33d51ddb3cc6b8cd10588302c33628',
Corentin Wallez21a23852018-07-31 18:50:03 +020045 'condition': 'dawn_standalone',
46 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020047 'third_party/googletest': {
Victor Costand097e7c2019-02-21 09:26:20 +000048 'url': '{chromium_git}/external/github.com/google/googletest@5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081',
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 Harrison27dcffc2020-04-06 15:05:32 +000064 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@6637610b16aacfe43c77ad4060da62008a83cd12',
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': {
Ryan Harrison27dcffc2020-04-06 15:05:32 +000070 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@e95fbfb1f509ad7a7fdfb72ac35fe412d72fc4a4',
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 Harrisoneb7eb902020-03-23 18:29:51 +000074 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@f8bf11a0253a32375c32cad92c841237b96696c0',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020075 'condition': 'dawn_standalone',
76 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020077 'third_party/glslang': {
Ryan Harrison27dcffc2020-04-06 15:05:32 +000078 'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@b5757b95005bbf6b0287096c5b708c5e25645311',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020079 'condition': 'dawn_standalone',
80 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020081 'third_party/shaderc': {
Ryan Harrison61e170b2020-04-08 20:30:52 +000082 'url': '{chromium_git}/external/github.com/google/shaderc@8026364968acb2e55390f6ccf295740ab818ebda',
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
104 # Khronos Vulkan-Headers
105 'third_party/vulkan-headers': {
Austin Engbc34d902020-02-21 18:34:44 +0000106 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Headers@d287523f48dba1b669866c5d6625b29931948e39',
Li, Hao0e1bef32019-11-07 12:13:27 +0000107 'condition': 'dawn_standalone',
108 },
109
110 # Khronos Vulkan-ValidationLayers
111 'third_party/vulkan-validation-layers': {
Austin Engbc34d902020-02-21 18:34:44 +0000112 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@237d818e81fbffa073d29d94f53a2cbac4f25b9f',
Li, Hao0e1bef32019-11-07 12:13:27 +0000113 'condition': 'dawn_standalone',
114 },
Corentin Wallez74cebd62019-11-26 18:21:51 +0000115
116 'third_party/swiftshader': {
Corentin Wallezc08a0d42020-04-08 16:01:22 +0000117 'url': '{swiftshader_git}/SwiftShader@63ed0e445fa525ee01637350ea92fbdaa2226c73',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000118 'condition': 'dawn_standalone',
119 },
120
Corentin Wallez21a23852018-07-31 18:50:03 +0200121}
122
123hooks = [
124 # Pull clang-format binaries using checked-in hashes.
125 {
126 'name': 'clang_format_win',
127 'pattern': '.',
128 'condition': 'host_os == "win" and dawn_standalone',
129 'action': [ 'download_from_google_storage',
130 '--no_resume',
131 '--platform=win32',
132 '--no_auth',
133 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200134 '-s', 'buildtools/win/clang-format.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200135 ],
136 },
137 {
138 'name': 'clang_format_mac',
139 'pattern': '.',
140 'condition': 'host_os == "mac" and dawn_standalone',
141 'action': [ 'download_from_google_storage',
142 '--no_resume',
143 '--platform=darwin',
144 '--no_auth',
145 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200146 '-s', 'buildtools/mac/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200147 ],
148 },
149 {
150 'name': 'clang_format_linux',
151 'pattern': '.',
152 'condition': 'host_os == "linux" and dawn_standalone',
153 'action': [ 'download_from_google_storage',
154 '--no_resume',
155 '--platform=linux*',
156 '--no_auth',
157 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200158 '-s', 'buildtools/linux64/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200159 ],
160 },
161
Corentin Wallez21a23852018-07-31 18:50:03 +0200162 # Pull the compilers and system libraries for hermetic builds
163 {
164 'name': 'sysroot_x86',
165 'pattern': '.',
166 'condition': 'checkout_linux and ((checkout_x86 or checkout_x64) and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200167 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200168 '--arch=x86'],
169 },
170 {
171 'name': 'sysroot_x64',
172 'pattern': '.',
173 'condition': 'checkout_linux and (checkout_x64 and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200174 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200175 '--arch=x64'],
176 },
177 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200178 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200179 'name': 'win_toolchain',
180 'pattern': '.',
181 'condition': 'checkout_win and dawn_standalone',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200182 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200183 },
184 {
185 # Note: On Win, this should run after win_toolchain, as it may use it.
186 'name': 'clang',
187 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200188 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200189 'condition': 'dawn_standalone',
190 },
191 {
192 # Pull rc binaries using checked-in hashes.
193 'name': 'rc_win',
194 'pattern': '.',
195 'condition': 'checkout_win and (host_os == "win" and dawn_standalone)',
196 'action': [ 'download_from_google_storage',
197 '--no_resume',
198 '--no_auth',
199 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200200 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200201 ],
202 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200203 # Pull binutils for linux hermetic builds
204 {
205 'name': 'binutils',
206 'pattern': 'src/third_party/binutils',
207 'condition': 'host_os == "linux"',
208 'action': [
209 'python',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200210 'third_party/binutils/download.py',
Corentin Wallezca81bd32018-09-03 11:55:58 +0200211 ],
212 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000213 # Update build/util/LASTCHANGE.
214 {
215 'name': 'lastchange',
216 'pattern': '.',
217 'action': ['python', 'build/util/lastchange.py',
218 '-o', 'build/util/LASTCHANGE'],
219 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200220]
221
222recursedeps = [
223 # buildtools provides clang_format, libc++, and libc++abi
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200224 'buildtools',
Corentin Wallez21a23852018-07-31 18:50:03 +0200225]