blob: 483dacbf9712534f951bd19262ab24fe9cfa7e58 [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',
8
Corentin Wallez21a23852018-07-31 18:50:03 +02009 'dawn_standalone': True,
10}
11
12deps = {
13 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020014 'build': {
Li Hao90d97872018-12-12 09:39:00 +000015 'url': '{chromium_git}/chromium/src/build@e439f6082423106f1fe2afa7e22f8fd4c00691df',
Corentin Wallez21a23852018-07-31 18:50:03 +020016 'condition': 'dawn_standalone',
17 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020018 'buildtools': {
Corentin Wallez15d8cb72018-11-19 10:13:31 +000019 'url': '{chromium_git}/chromium/buildtools@24ebce4578745db15274e180da1938ebc1358243',
Corentin Wallez21a23852018-07-31 18:50:03 +020020 'condition': 'dawn_standalone',
21 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020022 'tools/clang': {
Corentin Wallez15d8cb72018-11-19 10:13:31 +000023 'url': '{chromium_git}/chromium/src/tools/clang@1d879cee563167a2b18baffb096cf9e29f2f9376',
Corentin Wallezca81bd32018-09-03 11:55:58 +020024 'condition': 'dawn_standalone',
25 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020026 'third_party/binutils': {
Corentin Wallez15d8cb72018-11-19 10:13:31 +000027 'url': '{chromium_git}/chromium/src/third_party/binutils@2be73f7fbf783d7a0b288e174a5773b67c7656bc',
Corentin Wallez21a23852018-07-31 18:50:03 +020028 'condition': 'dawn_standalone',
29 },
30
Corentin Wallez649e2fe2018-08-03 15:57:43 +020031 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020032 'testing': {
Corentin Wallez682c44a2018-08-13 17:48:16 +020033 'url': '{chromium_git}/chromium/src/testing@b07830f6905ce9e33034ad14820bc0a58b6e9e41',
Corentin Wallez21a23852018-07-31 18:50:03 +020034 'condition': 'dawn_standalone',
35 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020036 'third_party/googletest': {
Victor Costand097e7c2019-02-21 09:26:20 +000037 'url': '{chromium_git}/external/github.com/google/googletest@5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020038 'condition': 'dawn_standalone',
39 },
Corentin Wallez21a23852018-07-31 18:50:03 +020040
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020041 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020042 'third_party/jinja2': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020043 'url': '{chromium_git}/chromium/src/third_party/jinja2@b41863e42637544c2941b574c7877d3e1f663e25',
44 'condition': 'dawn_standalone',
45 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020046 'third_party/markupsafe': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020047 'url': '{chromium_git}/chromium/src/third_party/markupsafe@8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
48 'condition': 'dawn_standalone',
49 },
50
Corentin Wallez21a23852018-07-31 18:50:03 +020051 # SPIRV-Cross
Corentin Wallez1a0596d2018-09-10 15:16:10 +020052 'third_party/spirv-cross': {
Ryan Harrison27e67b52019-07-09 15:29:29 +000053 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@53ab2144b90abede33be5161aec5dfc94ddc3caf',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020054 'condition': 'dawn_standalone',
Corentin Wallez21a23852018-07-31 18:50:03 +020055 },
Corentin Wallez649e2fe2018-08-03 15:57:43 +020056
57 # SPIRV compiler dependencies: SPIRV-Tools, SPIRV-headers, glslang and shaderc
Corentin Wallez1a0596d2018-09-10 15:16:10 +020058 'third_party/SPIRV-Tools': {
Ryan Harrison27e67b52019-07-09 15:29:29 +000059 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@0c4feb643b89d1792b02f7cbef315e9d95633bd7',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020060 'condition': 'dawn_standalone',
61 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020062 'third_party/spirv-headers': {
Ryan Harrisonc9b92902019-07-04 14:39:59 +000063 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@29c11140baaf9f7fdaa39a583672c556bf1795a1',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020064 'condition': 'dawn_standalone',
65 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020066 'third_party/glslang': {
Ryan Harrison27e67b52019-07-09 15:29:29 +000067 'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@8aa9a7bb8f74869ab9cfd2c9bd51cef1741004e7',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020068 'condition': 'dawn_standalone',
69 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020070 'third_party/shaderc': {
Ryan Harrison27e67b52019-07-09 15:29:29 +000071 'url': '{chromium_git}/external/github.com/google/shaderc@e9bb8f287417084d30c924026de9fa59dd32db41',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020072 'condition': 'dawn_standalone',
73 },
74
Corentin Wallez4d7d1692018-08-13 08:23:27 +020075 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +020076 'third_party/glfw': {
Corentin Wallez391c8a92018-11-19 10:21:23 +000077 'url': '{chromium_git}/external/github.com/glfw/glfw@2de2589f910b1a85905f425be4d32f33cec092df',
Corentin Wallez4d7d1692018-08-13 08:23:27 +020078 'condition': 'dawn_standalone',
79 },
80
Austin Engf3f5bf42019-05-18 03:14:46 +000081 # Dependencies for samples: GLM
Corentin Wallez1a0596d2018-09-10 15:16:10 +020082 'third_party/glm': {
Corentin Wallez4d7d1692018-08-13 08:23:27 +020083 'url': '{github_git}/g-truc/glm.git@06f084063fd6d9aa2ef6904517650700ae47b63d',
84 'condition': 'dawn_standalone',
85 },
Corentin Wallez4c351012018-08-27 10:10:28 +020086
87 # Our own pre-compiled Linux clang-format 7.0 for presubmit
88 'third_party/clang-format': {
89 'url': '{dawn_git}/clang-format@2451c56cd368676cdb230fd5ad11731ab859f1a3',
90 'condition': 'dawn_standalone and checkout_linux',
91 },
Corentin Wallez21a23852018-07-31 18:50:03 +020092}
93
94hooks = [
95 # Pull clang-format binaries using checked-in hashes.
96 {
97 'name': 'clang_format_win',
98 'pattern': '.',
99 'condition': 'host_os == "win" and dawn_standalone',
100 'action': [ 'download_from_google_storage',
101 '--no_resume',
102 '--platform=win32',
103 '--no_auth',
104 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200105 '-s', 'buildtools/win/clang-format.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200106 ],
107 },
108 {
109 'name': 'clang_format_mac',
110 'pattern': '.',
111 'condition': 'host_os == "mac" and dawn_standalone',
112 'action': [ 'download_from_google_storage',
113 '--no_resume',
114 '--platform=darwin',
115 '--no_auth',
116 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200117 '-s', 'buildtools/mac/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200118 ],
119 },
120 {
121 'name': 'clang_format_linux',
122 'pattern': '.',
123 'condition': 'host_os == "linux" and dawn_standalone',
124 'action': [ 'download_from_google_storage',
125 '--no_resume',
126 '--platform=linux*',
127 '--no_auth',
128 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200129 '-s', 'buildtools/linux64/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200130 ],
131 },
132
133 # Pull GN binaries using checked-in hashes.
134 {
135 'name': 'gn_win',
136 'pattern': '.',
137 'condition': 'host_os == "win" and dawn_standalone',
138 'action': [ 'download_from_google_storage',
139 '--no_resume',
140 '--platform=win32',
141 '--no_auth',
142 '--bucket', 'chromium-gn',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200143 '-s', 'buildtools/win/gn.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200144 ],
145 },
146 {
147 'name': 'gn_mac',
148 'pattern': '.',
149 'condition': 'host_os == "mac" and dawn_standalone',
150 'action': [ 'download_from_google_storage',
151 '--no_resume',
152 '--platform=darwin',
153 '--no_auth',
154 '--bucket', 'chromium-gn',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200155 '-s', 'buildtools/mac/gn.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200156 ],
157 },
158 {
159 'name': 'gn_linux64',
160 'pattern': '.',
161 'condition': 'host_os == "linux" and dawn_standalone',
162 'action': [ 'download_from_google_storage',
163 '--no_resume',
164 '--platform=linux*',
165 '--no_auth',
166 '--bucket', 'chromium-gn',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200167 '-s', 'buildtools/linux64/gn.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200168 ],
169 },
170
171 # Pull the compilers and system libraries for hermetic builds
172 {
173 'name': 'sysroot_x86',
174 'pattern': '.',
175 'condition': 'checkout_linux and ((checkout_x86 or 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=x86'],
178 },
179 {
180 'name': 'sysroot_x64',
181 'pattern': '.',
182 'condition': 'checkout_linux and (checkout_x64 and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200183 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200184 '--arch=x64'],
185 },
186 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200187 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200188 'name': 'win_toolchain',
189 'pattern': '.',
190 'condition': 'checkout_win and dawn_standalone',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200191 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200192 },
193 {
194 # Note: On Win, this should run after win_toolchain, as it may use it.
195 'name': 'clang',
196 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200197 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200198 'condition': 'dawn_standalone',
199 },
200 {
201 # Pull rc binaries using checked-in hashes.
202 'name': 'rc_win',
203 'pattern': '.',
204 'condition': 'checkout_win and (host_os == "win" and dawn_standalone)',
205 'action': [ 'download_from_google_storage',
206 '--no_resume',
207 '--no_auth',
208 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200209 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200210 ],
211 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200212 # Pull binutils for linux hermetic builds
213 {
214 'name': 'binutils',
215 'pattern': 'src/third_party/binutils',
216 'condition': 'host_os == "linux"',
217 'action': [
218 'python',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200219 'third_party/binutils/download.py',
Corentin Wallezca81bd32018-09-03 11:55:58 +0200220 ],
221 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000222 # Update build/util/LASTCHANGE.
223 {
224 'name': 'lastchange',
225 'pattern': '.',
226 'action': ['python', 'build/util/lastchange.py',
227 '-o', 'build/util/LASTCHANGE'],
228 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200229]
230
231recursedeps = [
232 # buildtools provides clang_format, libc++, and libc++abi
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200233 'buildtools',
Corentin Wallez21a23852018-07-31 18:50:03 +0200234]