blob: f5460365cebdde0cad2551ac6eae1025831c2a40 [file] [log] [blame]
Corentin Wallez1a0596d2018-09-10 15:16:10 +02001use_relative_paths = True
2use_relative_hooks = True
3
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +00004gclient_gn_args_file = 'build/config/gclient_args.gni'
5gclient_gn_args = [
6 'mac_xcode_version',
7]
8
Corentin Wallez21a23852018-07-31 18:50:03 +02009vars = {
10 'chromium_git': 'https://chromium.googlesource.com',
Corentin Wallez4c351012018-08-27 10:10:28 +020011 'dawn_git': 'https://dawn.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +020012 'github_git': 'https://github.com',
Corentin Wallez74cebd62019-11-26 18:21:51 +000013 'swiftshader_git': 'https://swiftshader.googlesource.com',
Corentin Wallez21a23852018-07-31 18:50:03 +020014
Corentin Wallez21a23852018-07-31 18:50:03 +020015 'dawn_standalone': True,
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +000016
17 # This can be overridden, e.g. with custom_vars, to download a nonstandard
18 # Xcode version in build/mac_toolchain.py instead of downloading the
19 # prebuilt pinned revision.
20 'mac_xcode_version': 'default',
Corentin Wallez21a23852018-07-31 18:50:03 +020021}
22
23deps = {
24 # Dependencies required to use GN/Clang in standalone
Corentin Wallez1a0596d2018-09-10 15:16:10 +020025 'build': {
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +000026 'url': '{chromium_git}/chromium/src/build@b8f14c09b76ae3bd6edabe45105527a97e1e16bd',
Corentin Wallez21a23852018-07-31 18:50:03 +020027 'condition': 'dawn_standalone',
28 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020029 'buildtools': {
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +000030 'url': '{chromium_git}/chromium/src/buildtools@eb3987ec709b39469423100c1e77f0446890e059',
Corentin Wallez21a23852018-07-31 18:50:03 +020031 'condition': 'dawn_standalone',
32 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020033 'tools/clang': {
Corentin Wallez4e2d7cf2020-07-14 15:53:34 +000034 'url': '{chromium_git}/chromium/src/tools/clang@d027d75e8dd91140115a4cc9c7c3598c44bbf634',
Corentin Wallez21a23852018-07-31 18:50:03 +020035 'condition': 'dawn_standalone',
36 },
Kai Ninomiyaf526d772020-04-06 22:27:02 +000037 'tools/clang/dsymutil': {
38 'packages': [
39 {
40 'package': 'chromium/llvm-build-tools/dsymutil',
41 'version': 'M56jPzDv1620Rnm__jTMYS62Zi8rxHVq7yw0qeBFEgkC',
42 }
43 ],
44 'condition': 'checkout_mac or checkout_ios',
45 'dep_type': 'cipd',
46 },
Corentin Wallez21a23852018-07-31 18:50:03 +020047
Corentin Wallez649e2fe2018-08-03 15:57:43 +020048 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020049 'testing': {
Victor Costan0721c1c2020-04-15 20:06:27 +000050 'url': '{chromium_git}/chromium/src/testing@e5ced5141379ee8ae28b4f93d3c02df039d2b052',
Corentin Wallez21a23852018-07-31 18:50:03 +020051 'condition': 'dawn_standalone',
52 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020053 'third_party/googletest': {
Corentin Walleza02619d2020-05-11 15:37:11 +000054 'url': '{chromium_git}/external/github.com/google/googletest@a09ea700d32bab83325aff9ff34d0582e50e3997',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020055 'condition': 'dawn_standalone',
56 },
Corentin Wallez21a23852018-07-31 18:50:03 +020057
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020058 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020059 'third_party/jinja2': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020060 'url': '{chromium_git}/chromium/src/third_party/jinja2@b41863e42637544c2941b574c7877d3e1f663e25',
61 'condition': 'dawn_standalone',
62 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020063 'third_party/markupsafe': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020064 'url': '{chromium_git}/chromium/src/third_party/markupsafe@8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
65 'condition': 'dawn_standalone',
66 },
67
Corentin Wallez21a23852018-07-31 18:50:03 +020068 # SPIRV-Cross
Corentin Wallez1a0596d2018-09-10 15:16:10 +020069 'third_party/spirv-cross': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000070 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@559b21c6c91f65ba52cdfa7a76e1185cd3c8f144',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020071 'condition': 'dawn_standalone',
Corentin Wallez21a23852018-07-31 18:50:03 +020072 },
Corentin Wallez649e2fe2018-08-03 15:57:43 +020073
74 # SPIRV compiler dependencies: SPIRV-Tools, SPIRV-headers, glslang and shaderc
Corentin Wallez1a0596d2018-09-10 15:16:10 +020075 'third_party/SPIRV-Tools': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000076 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@2fbeb04b6e6b6da58fd5fe7f801a9de5b32f656f',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020077 'condition': 'dawn_standalone',
78 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020079 'third_party/spirv-headers': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000080 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@308bd07424350a6000f35a77b5f85cd4f3da319e',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020081 'condition': 'dawn_standalone',
82 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020083 'third_party/glslang': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000084 'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@29c9135d06f12628e3161e4aa751610c5941d8d6',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020085 'condition': 'dawn_standalone',
86 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020087 'third_party/shaderc': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000088 'url': '{chromium_git}/external/github.com/google/shaderc@1402ed576596f53eaf3f8d390a9e1defbeffd014',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020089 'condition': 'dawn_standalone',
90 },
91
Ryan Harrison991b9472020-05-06 23:15:54 +000092 # WGSL support
93 'third_party/tint': {
Ryan Harrisona0b45712020-07-07 20:45:02 +000094 'url': '{dawn_git}/tint@7b819aa162403eceb22133de44c15f20e3bcd862',
Ryan Harrison991b9472020-05-06 23:15:54 +000095 'condition': 'dawn_standalone',
96 },
97
Corentin Wallez4d7d1692018-08-13 08:23:27 +020098 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +020099 'third_party/glfw': {
Corentin Walleza5a6e4f2020-01-23 15:10:58 +0000100 'url': '{chromium_git}/external/github.com/glfw/glfw@d973acc123826666ecc9e6fd475682e3d84c54a6',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200101 'condition': 'dawn_standalone',
102 },
103
Austin Engf3f5bf42019-05-18 03:14:46 +0000104 # Dependencies for samples: GLM
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200105 'third_party/glm': {
Zhenyao Mo37193aa2020-04-14 16:20:14 +0000106 'url': '{github_git}/g-truc/glm.git@bf71a834948186f4097caa076cd2663c69a10e1e',
Corentin Wallez4d7d1692018-08-13 08:23:27 +0200107 'condition': 'dawn_standalone',
108 },
Corentin Wallez4c351012018-08-27 10:10:28 +0200109
Corentin Wallez09257202020-04-17 08:22:25 +0000110 # Khronos Vulkan headers, validation layers and loader.
Li, Hao0e1bef32019-11-07 12:13:27 +0000111 'third_party/vulkan-headers': {
Corentin Wallezb72434f2020-07-07 14:28:41 +0000112 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Headers@4c079bf40c2587220dbf157d825d3185c9adc896',
Li, Hao0e1bef32019-11-07 12:13:27 +0000113 'condition': 'dawn_standalone',
114 },
Li, Hao0e1bef32019-11-07 12:13:27 +0000115 'third_party/vulkan-validation-layers': {
Corentin Wallezb72434f2020-07-07 14:28:41 +0000116 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@e8b96e86fe2edfaee274b98fbbe1bd65579b0904',
Li, Hao0e1bef32019-11-07 12:13:27 +0000117 'condition': 'dawn_standalone',
118 },
Corentin Wallez09257202020-04-17 08:22:25 +0000119 'third_party/vulkan-loader': {
Ryan Harrison73c99092020-05-26 20:00:43 +0000120 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Loader@006586926adece57adea3e006140b5df19826371',
Corentin Wallez09257202020-04-17 08:22:25 +0000121 'condition': 'dawn_standalone',
122 },
Corentin Wallez74cebd62019-11-26 18:21:51 +0000123
124 'third_party/swiftshader': {
Corentin Wallez92f501d2020-07-14 06:58:54 +0000125 'url': '{swiftshader_git}/SwiftShader@ad65826a2ab181592473fb54ab78025771f4caf6',
Corentin Wallez74cebd62019-11-26 18:21:51 +0000126 'condition': 'dawn_standalone',
127 },
128
Corentin Wallez21a23852018-07-31 18:50:03 +0200129}
130
131hooks = [
132 # Pull clang-format binaries using checked-in hashes.
133 {
134 'name': 'clang_format_win',
135 'pattern': '.',
136 'condition': 'host_os == "win" and dawn_standalone',
137 'action': [ 'download_from_google_storage',
138 '--no_resume',
139 '--platform=win32',
140 '--no_auth',
141 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200142 '-s', 'buildtools/win/clang-format.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200143 ],
144 },
145 {
146 'name': 'clang_format_mac',
147 'pattern': '.',
148 'condition': 'host_os == "mac" and dawn_standalone',
149 'action': [ 'download_from_google_storage',
150 '--no_resume',
151 '--platform=darwin',
152 '--no_auth',
153 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200154 '-s', 'buildtools/mac/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200155 ],
156 },
157 {
158 'name': 'clang_format_linux',
159 'pattern': '.',
160 'condition': 'host_os == "linux" and dawn_standalone',
161 'action': [ 'download_from_google_storage',
162 '--no_resume',
163 '--platform=linux*',
164 '--no_auth',
165 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200166 '-s', 'buildtools/linux64/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200167 ],
168 },
169
Corentin Wallez21a23852018-07-31 18:50:03 +0200170 # Pull the compilers and system libraries for hermetic builds
171 {
172 'name': 'sysroot_x86',
173 'pattern': '.',
174 'condition': 'checkout_linux and ((checkout_x86 or checkout_x64) and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200175 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200176 '--arch=x86'],
177 },
178 {
179 'name': 'sysroot_x64',
180 'pattern': '.',
181 'condition': 'checkout_linux and (checkout_x64 and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200182 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200183 '--arch=x64'],
184 },
185 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200186 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200187 'name': 'win_toolchain',
188 'pattern': '.',
189 'condition': 'checkout_win and dawn_standalone',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200190 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200191 },
192 {
193 # Note: On Win, this should run after win_toolchain, as it may use it.
194 'name': 'clang',
195 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200196 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200197 'condition': 'dawn_standalone',
198 },
199 {
200 # Pull rc binaries using checked-in hashes.
201 'name': 'rc_win',
202 'pattern': '.',
203 'condition': 'checkout_win and (host_os == "win" and dawn_standalone)',
204 'action': [ 'download_from_google_storage',
205 '--no_resume',
206 '--no_auth',
207 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200208 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200209 ],
210 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000211 # Update build/util/LASTCHANGE.
212 {
213 'name': 'lastchange',
214 'pattern': '.',
Jiajie Hu2ffc55a2020-07-01 05:08:36 +0000215 'condition': 'dawn_standalone',
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000216 'action': ['python', 'build/util/lastchange.py',
217 '-o', 'build/util/LASTCHANGE'],
218 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200219]
220
221recursedeps = [
222 # buildtools provides clang_format, libc++, and libc++abi
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200223 'buildtools',
Corentin Wallez21a23852018-07-31 18:50:03 +0200224]