blob: f2e5e218d0d318966bec61888ed9ac8cd0eb5d21 [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 },
31
Corentin Wallez649e2fe2018-08-03 15:57:43 +020032 # Testing, GTest and GMock
Corentin Wallez1a0596d2018-09-10 15:16:10 +020033 'testing': {
Robert Iannucciebb05392019-08-09 01:40:38 +000034 'url': '{chromium_git}/chromium/src/testing@2ffbbb3c8e33d51ddb3cc6b8cd10588302c33628',
Corentin Wallez21a23852018-07-31 18:50:03 +020035 'condition': 'dawn_standalone',
36 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020037 'third_party/googletest': {
Victor Costand097e7c2019-02-21 09:26:20 +000038 'url': '{chromium_git}/external/github.com/google/googletest@5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020039 'condition': 'dawn_standalone',
40 },
Corentin Wallez21a23852018-07-31 18:50:03 +020041
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020042 # Jinja2 and MarkupSafe for the code generator
Corentin Wallez1a0596d2018-09-10 15:16:10 +020043 'third_party/jinja2': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020044 'url': '{chromium_git}/chromium/src/third_party/jinja2@b41863e42637544c2941b574c7877d3e1f663e25',
45 'condition': 'dawn_standalone',
46 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020047 'third_party/markupsafe': {
Corentin Wallez3bb0bb92018-08-13 17:47:44 +020048 'url': '{chromium_git}/chromium/src/third_party/markupsafe@8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
49 'condition': 'dawn_standalone',
50 },
51
Corentin Wallez21a23852018-07-31 18:50:03 +020052 # SPIRV-Cross
Corentin Wallez1a0596d2018-09-10 15:16:10 +020053 'third_party/spirv-cross': {
Ryan Harrison1dbb5282020-01-09 16:09:37 +000054 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Cross@172e39f0398b920cfc221b7826c92105d44ad647',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020055 'condition': 'dawn_standalone',
Corentin Wallez21a23852018-07-31 18:50:03 +020056 },
Corentin Wallez649e2fe2018-08-03 15:57:43 +020057
58 # SPIRV compiler dependencies: SPIRV-Tools, SPIRV-headers, glslang and shaderc
Corentin Wallez1a0596d2018-09-10 15:16:10 +020059 'third_party/SPIRV-Tools': {
Ryan Harrison1dbb5282020-01-09 16:09:37 +000060 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Tools@fb2e819819ef0a23b552326240822b8d657e4d76',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020061 'condition': 'dawn_standalone',
62 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020063 'third_party/spirv-headers': {
Ryan Harrison39695fd2019-11-20 15:43:21 +000064 'url': '{chromium_git}/external/github.com/KhronosGroup/SPIRV-Headers@204cd131c42b90d129073719f2766293ce35c081',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020065 'condition': 'dawn_standalone',
66 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020067 'third_party/glslang': {
Ryan Harrison1dbb5282020-01-09 16:09:37 +000068 'url': '{chromium_git}/external/github.com/KhronosGroup/glslang@51813670627c976a93f4cfbea6fa89fdb4d35cad',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020069 'condition': 'dawn_standalone',
70 },
Corentin Wallez1a0596d2018-09-10 15:16:10 +020071 'third_party/shaderc': {
Ryan Harrison1dbb5282020-01-09 16:09:37 +000072 'url': '{chromium_git}/external/github.com/google/shaderc@0b9a2992c73d41debe4924d9f39260f773b5840a',
Corentin Wallez649e2fe2018-08-03 15:57:43 +020073 'condition': 'dawn_standalone',
74 },
75
Corentin Wallez4d7d1692018-08-13 08:23:27 +020076 # GLFW for tests and samples
Corentin Wallez1a0596d2018-09-10 15:16:10 +020077 'third_party/glfw': {
Corentin Wallez391c8a92018-11-19 10:21:23 +000078 'url': '{chromium_git}/external/github.com/glfw/glfw@2de2589f910b1a85905f425be4d32f33cec092df',
Corentin Wallez4d7d1692018-08-13 08:23:27 +020079 'condition': 'dawn_standalone',
80 },
81
Austin Engf3f5bf42019-05-18 03:14:46 +000082 # Dependencies for samples: GLM
Corentin Wallez1a0596d2018-09-10 15:16:10 +020083 'third_party/glm': {
Corentin Wallez4d7d1692018-08-13 08:23:27 +020084 'url': '{github_git}/g-truc/glm.git@06f084063fd6d9aa2ef6904517650700ae47b63d',
85 'condition': 'dawn_standalone',
86 },
Corentin Wallez4c351012018-08-27 10:10:28 +020087
88 # Our own pre-compiled Linux clang-format 7.0 for presubmit
89 'third_party/clang-format': {
90 'url': '{dawn_git}/clang-format@2451c56cd368676cdb230fd5ad11731ab859f1a3',
91 'condition': 'dawn_standalone and checkout_linux',
92 },
Li, Hao0e1bef32019-11-07 12:13:27 +000093
94 # Khronos Vulkan-Headers
95 'third_party/vulkan-headers': {
96 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-Headers@5b44df19e040fca0048ab30c553a8c2d2cb9623e',
97 'condition': 'dawn_standalone',
98 },
99
100 # Khronos Vulkan-ValidationLayers
101 'third_party/vulkan-validation-layers': {
102 'url': '{chromium_git}/external/github.com/KhronosGroup/Vulkan-ValidationLayers@9fba37afae13a11bd49ae942bf82e5bf1098e381',
103 'condition': 'dawn_standalone',
104 },
Corentin Wallez74cebd62019-11-26 18:21:51 +0000105
106 'third_party/swiftshader': {
107 'url': '{swiftshader_git}/SwiftShader@e7ce4e53915d026720005ca2c1831a5c28f77b3f',
108 'condition': 'dawn_standalone',
109 },
110
Corentin Wallez21a23852018-07-31 18:50:03 +0200111}
112
113hooks = [
114 # Pull clang-format binaries using checked-in hashes.
115 {
116 'name': 'clang_format_win',
117 'pattern': '.',
118 'condition': 'host_os == "win" and dawn_standalone',
119 'action': [ 'download_from_google_storage',
120 '--no_resume',
121 '--platform=win32',
122 '--no_auth',
123 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200124 '-s', 'buildtools/win/clang-format.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200125 ],
126 },
127 {
128 'name': 'clang_format_mac',
129 'pattern': '.',
130 'condition': 'host_os == "mac" and dawn_standalone',
131 'action': [ 'download_from_google_storage',
132 '--no_resume',
133 '--platform=darwin',
134 '--no_auth',
135 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200136 '-s', 'buildtools/mac/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200137 ],
138 },
139 {
140 'name': 'clang_format_linux',
141 'pattern': '.',
142 'condition': 'host_os == "linux" and dawn_standalone',
143 'action': [ 'download_from_google_storage',
144 '--no_resume',
145 '--platform=linux*',
146 '--no_auth',
147 '--bucket', 'chromium-clang-format',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200148 '-s', 'buildtools/linux64/clang-format.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200149 ],
150 },
151
Corentin Wallez21a23852018-07-31 18:50:03 +0200152 # Pull the compilers and system libraries for hermetic builds
153 {
154 'name': 'sysroot_x86',
155 'pattern': '.',
156 'condition': 'checkout_linux and ((checkout_x86 or checkout_x64) and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200157 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200158 '--arch=x86'],
159 },
160 {
161 'name': 'sysroot_x64',
162 'pattern': '.',
163 'condition': 'checkout_linux and (checkout_x64 and dawn_standalone)',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200164 'action': ['python', 'build/linux/sysroot_scripts/install-sysroot.py',
Corentin Wallez21a23852018-07-31 18:50:03 +0200165 '--arch=x64'],
166 },
167 {
Corentin Wallez682c44a2018-08-13 17:48:16 +0200168 # Update the Windows toolchain if necessary. Must run before 'clang' below.
Corentin Wallez21a23852018-07-31 18:50:03 +0200169 'name': 'win_toolchain',
170 'pattern': '.',
171 'condition': 'checkout_win and dawn_standalone',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200172 'action': ['python', 'build/vs_toolchain.py', 'update', '--force'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200173 },
174 {
175 # Note: On Win, this should run after win_toolchain, as it may use it.
176 'name': 'clang',
177 'pattern': '.',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200178 'action': ['python', 'tools/clang/scripts/update.py'],
Corentin Wallez21a23852018-07-31 18:50:03 +0200179 'condition': 'dawn_standalone',
180 },
181 {
182 # Pull rc binaries using checked-in hashes.
183 'name': 'rc_win',
184 'pattern': '.',
185 'condition': 'checkout_win and (host_os == "win" and dawn_standalone)',
186 'action': [ 'download_from_google_storage',
187 '--no_resume',
188 '--no_auth',
189 '--bucket', 'chromium-browser-clang/rc',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200190 '-s', 'build/toolchain/win/rc/win/rc.exe.sha1',
Corentin Wallez21a23852018-07-31 18:50:03 +0200191 ],
192 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200193 # Pull binutils for linux hermetic builds
194 {
195 'name': 'binutils',
196 'pattern': 'src/third_party/binutils',
197 'condition': 'host_os == "linux"',
198 'action': [
199 'python',
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200200 'third_party/binutils/download.py',
Corentin Wallezca81bd32018-09-03 11:55:58 +0200201 ],
202 },
Corentin Wallez15d8cb72018-11-19 10:13:31 +0000203 # Update build/util/LASTCHANGE.
204 {
205 'name': 'lastchange',
206 'pattern': '.',
207 'action': ['python', 'build/util/lastchange.py',
208 '-o', 'build/util/LASTCHANGE'],
209 },
Corentin Wallezca81bd32018-09-03 11:55:58 +0200210]
211
212recursedeps = [
213 # buildtools provides clang_format, libc++, and libc++abi
Corentin Wallez1a0596d2018-09-10 15:16:10 +0200214 'buildtools',
Corentin Wallez21a23852018-07-31 18:50:03 +0200215]