blob: b6582a858324f09befa2a8d7595e2af72869d828 [file] [log] [blame]
Lei Zhange4bf8342015-10-21 17:11:04 -07001use_relative_paths = True
2
Dan Sinclaira03c3432016-03-16 15:35:20 -04003vars = {
Lei Zhangab384ed2017-12-21 08:00:44 +00004 # By default, we should check out everything needed to run on the main
5 # chromium waterfalls. This var can be also be set to "small", in order
6 # to skip things are not strictly needed to build chromium for development
7 # purposes.
8 'checkout_configuration': 'default',
9
10 # TODO(dpranke): change to != "small" once != is supported.
11 'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration == "default"',
12
Dan Sinclaira03c3432016-03-16 15:35:20 -040013 'chromium_git': 'https://chromium.googlesource.com',
14 'pdfium_git': 'https://pdfium.googlesource.com',
15
Henrique Nakashimabb04c592018-01-31 21:38:34 +000016 'android_ndk_revision': 'e951c37287c7d8cd915bf8d4149fd4a06d808b55',
Lei Zhangdfc08432017-12-21 07:37:15 +000017 'binutils_revision': 'e146228c20af6af922887d0be2d3641cbffb33c5',
Lei Zhangabc119e2018-03-22 16:55:25 +000018 'build_revision': '74c3e0639039ecb84050b26c194b296a68c38fa5',
Lei Zhang0f494c82018-03-22 06:36:04 +000019 'buildtools_revision': '3748a2a90871fc25b0455790fa5a6699553f5197',
Lei Zhangcd691c12018-03-19 22:38:47 +000020 'catapult_revision': '4f03e51f019492441438893094f789df20102a93',
Lei Zhang34481432018-03-19 23:14:16 +000021 'clang_revision': '7d56ff908453df0d88618197a48c026eb6f966de',
Dan Sinclaira03c3432016-03-16 15:35:20 -040022 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Lei Zhangf9f0e512018-03-22 17:14:36 +000023 'depot_tools_revision': '869a2857a4f3acc08fdec6182ecec5b73593be3b',
Lei Zhang9b746fd2018-02-21 14:35:03 +000024 'freetype_revision': '713d68ee9f47cc8df56e47fa2f54b191bb8c3186',
Lei Zhangc5514272018-03-22 05:19:14 +000025 'gtest_revision': 'a325ad2db5deb623eab740527e559b81c0f39d65',
Lei Zhangba5c9312017-12-09 07:21:46 +000026 'icu_revision': 'e3b480d3be4446ea17011c0cdc9c4cd380a5c58f',
Lei Zhang7212f322018-03-19 22:08:37 +000027 'instrumented_lib_revision': '323cf32193caecbf074d1a0cb5b02b905f163e0f',
Dale Curtisc758d9d2017-04-06 14:10:09 -070028 'jinja2_revision': 'd34383206fa42d52faa10bb9931d6d538f3a57e0',
Lei Zhang0e5d8922017-04-06 21:43:50 -070029 'jpeg_turbo_revision': '7260e4d8b8e1e40b17f03fafdf1cd83296900f76',
Dale Curtisc758d9d2017-04-06 14:10:09 -070030 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Henrique Nakashima3f4befb2018-03-06 22:25:03 +000031 'pdfium_tests_revision': 'b86c0ec9ee2aa3ba5e113a0e88a5c3292eb0fe2f',
Lei Zhangc49f39d2018-03-19 22:39:27 +000032 'skia_revision': 'af7700265b74123d8ad3de6dde0c21545453140b',
dsinclairfb969002016-05-31 12:55:32 -070033 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d',
Lei Zhangda25b842017-12-09 07:21:07 +000034 'trace_event_revision': '0e9a47d74970bee1bbfc063c47215406f8918699',
Lei Zhang89653e32018-03-19 22:05:07 +000035 'v8_revision': '9cf8abb7ce7e3a3152fb71d0e87678e64f7ab0c8',
Lei Zhange20e80a2017-08-17 12:23:40 -070036 'yasm_source_revision': 'b98114e18d8b9b84586b10d24353ab8616d4c5fc',
Lei Zhang61a9fb22018-03-22 16:56:15 +000037 'zlib_revision': '8c371ad77b836c02e44006dc2dc77c5d6d910861',
Dan Sinclaira03c3432016-03-16 15:35:20 -040038}
39
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070040deps = {
thestig5fec5972016-08-30 06:39:40 -070041 "base/trace_event/common":
42 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
43 Var('trace_event_revision'),
44
dsinclair685bb882016-04-20 07:32:39 -070045 "build":
46 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070047
Tom Sepez4c0e2752015-06-05 13:46:08 -070048 "buildtools":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070049 Var('chromium_git') + "/chromium/buildtools.git@" +
50 Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070051
Tom Sepez9519ab22015-03-16 15:27:19 -070052 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040053 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070054
Lei Zhangdfc08432017-12-21 07:37:15 +000055 "third_party/binutils":
56 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
57 Var('binutils_revision'),
58
Lei Zhangab384ed2017-12-21 08:00:44 +000059 'third_party/depot_tools':
60 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
61 Var('depot_tools_revision'),
62
Lei Zhangeb39cdb2017-03-31 12:26:15 -070063 "third_party/freetype/src":
64 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
65 Var('freetype_revision'),
66
Lei Zhangc5514272018-03-22 05:19:14 +000067 "third_party/googletest/src":
68 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
69 Var('gtest_revision'),
70
dsinclair685bb882016-04-20 07:32:39 -070071 "third_party/icu":
72 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
73
weili62f36732016-10-14 16:59:40 -070074 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070075 Var('chromium_git') +
76 "/chromium/src/third_party/instrumented_libraries.git@" +
77 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -070078
Dale Curtisc758d9d2017-04-06 14:10:09 -070079 "third_party/jinja2":
80 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
81 Var('jinja2_revision'),
82
83 "third_party/markupsafe":
84 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
85 Var('markupsafe_revision'),
86
Lei Zhang0e5d8922017-04-06 21:43:50 -070087 "third_party/libjpeg_turbo":
88 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
89 Var('jpeg_turbo_revision'),
90
Dan Sinclaira03c3432016-03-16 15:35:20 -040091 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070092 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080093
Lei Zhanga2af7de2017-03-31 13:33:12 -070094 "third_party/zlib":
95 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
96 Var('zlib_revision'),
97
Lei Zhang0e5d8922017-04-06 21:43:50 -070098 'third_party/yasm/source/patched-yasm':
99 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
100 Var('yasm_source_revision'),
101
Oliver Changafaa98e2015-10-21 15:29:47 -0700102 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -0700103 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -0700104
Tom Anderson19817af2017-07-18 18:00:18 -0700105 # TODO(GYP): Remove this when no tools rely on GYP anymore.
106 "tools/gyp":
107 Var('chromium_git') + '/external/gyp.git@' +
108 'eb296f67da078ec01f5e3a9ea9cdc6d26d680161',
109
dsinclairfb969002016-05-31 12:55:32 -0700110 "tools/memory":
111 Var('chromium_git') + "/chromium/src/tools/memory@" +
112 Var('tools_memory_revision'),
113
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700114 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400115 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700116}
117
118deps_os = {
jbudorick7f3a15f2016-06-10 06:28:40 -0700119 "android": {
120 "third_party/android_ndk":
121 Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
122 "third_party/catapult":
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700123 Var('chromium_git') +
124 "/external/github.com/catapult-project/catapult.git@" +
125 Var('catapult_revision'),
jbudorick7f3a15f2016-06-10 06:28:40 -0700126 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700127 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700128 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400129 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700130 },
131}
Tom Sepez4c0e2752015-06-05 13:46:08 -0700132
thestig3873f302016-09-28 17:39:26 -0700133recursedeps = [
134 # buildtools provides clang_format, libc++, and libc++abi
135 'buildtools',
136]
137
Tom Sepez4c0e2752015-06-05 13:46:08 -0700138include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800139 # Basic stuff that everyone can use.
140 # Note: public is not here because core cannot depend on public.
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700141 '+testing',
142 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700143]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700144
weili90c964f2016-04-22 15:25:14 -0700145specific_include_rules = {
146 # Allow embedder tests to use public APIs.
147 "(.*embeddertest\.cpp)": [
148 "+public",
149 ]
150}
151
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700152hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700153 {
dsinclairb4e87082016-04-20 12:18:16 -0700154 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700155 'action': [ 'download_from_google_storage',
156 '--no_resume',
157 '--platform=win32',
158 '--no_auth',
159 '--bucket', 'chromium-gn',
160 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
161 ],
162 },
163 {
164 'name': 'gn_mac',
165 'pattern': '.',
166 'action': [ 'download_from_google_storage',
167 '--no_resume',
168 '--platform=darwin',
169 '--no_auth',
170 '--bucket', 'chromium-gn',
171 '-s', 'pdfium/buildtools/mac/gn.sha1',
172 ],
173 },
174 {
175 'name': 'gn_linux64',
176 'pattern': '.',
177 'action': [ 'download_from_google_storage',
178 '--no_resume',
179 '--platform=linux*',
180 '--no_auth',
181 '--bucket', 'chromium-gn',
182 '-s', 'pdfium/buildtools/linux64/gn.sha1',
183 ],
184 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700185 # Pull clang-format binaries using checked-in hashes.
186 {
187 'name': 'clang_format_win',
188 'pattern': '.',
189 'action': [ 'download_from_google_storage',
190 '--no_resume',
191 '--platform=win32',
192 '--no_auth',
193 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700194 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700195 ],
196 },
197 {
198 'name': 'clang_format_mac',
199 'pattern': '.',
200 'action': [ 'download_from_google_storage',
201 '--no_resume',
202 '--platform=darwin',
203 '--no_auth',
204 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700205 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700206 ],
207 },
208 {
209 'name': 'clang_format_linux',
210 'pattern': '.',
211 'action': [ 'download_from_google_storage',
212 '--no_resume',
213 '--platform=linux*',
214 '--no_auth',
215 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700216 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700217 ],
218 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700219 {
dsinclairb12fbdde2016-09-19 10:45:14 -0700220 # Pull clang
Oliver Changafaa98e2015-10-21 15:29:47 -0700221 'name': 'clang',
222 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700223 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700224 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700225 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700226 },
weili9a1b6652016-04-28 15:26:45 -0700227 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000228 'name': 'binutils',
229 'pattern': 'src/third_party/binutils',
230 'condition': 'host_os == "linux"',
231 'action': [
232 'python',
233 'pdfium/third_party/binutils/download.py',
234 ],
235 },
236 {
Lei Zhang728127c2018-02-16 19:26:20 +0000237 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700238 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000239 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700240 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000241 '--arch=arm'],
242 },
243 {
244 'name': 'sysroot_arm64',
245 'pattern': '.',
246 'condition': 'checkout_linux and checkout_arm64',
247 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
248 '--arch=arm64'],
249 },
250 {
251 'name': 'sysroot_x86',
252 'pattern': '.',
253 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
254 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
255 '--arch=x86'],
256 },
257 {
258 'name': 'sysroot_mips',
259 'pattern': '.',
260 'condition': 'checkout_linux and checkout_mips',
261 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
262 '--arch=mips'],
263 },
264 {
265 'name': 'sysroot_x64',
266 'pattern': '.',
267 'condition': 'checkout_linux and checkout_x64',
268 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
269 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700270 },
271 {
Lei Zhang451c9b42018-02-21 10:35:20 +0000272 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
273 'name': 'ciopfs_linux',
274 'pattern': '.',
275 'condition': 'checkout_win and host_os == "linux"',
276 'action': [ 'python',
277 'pdfium/third_party/depot_tools/download_from_google_storage.py',
278 '--no_resume',
279 '--no_auth',
280 '--bucket', 'chromium-browser-clang/ciopfs',
281 '-s', 'pdfium/build/ciopfs.sha1',
282 ]
283 },
284 {
weili9a1b6652016-04-28 15:26:45 -0700285 # Update the Windows toolchain if necessary.
286 'name': 'win_toolchain',
287 'pattern': '.',
Lei Zhang63579f92017-12-21 19:18:00 -0800288 'condition': 'checkout_win',
Lei Zhang451c9b42018-02-21 10:35:20 +0000289 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
weili9a1b6652016-04-28 15:26:45 -0700290 },
weili62f36732016-10-14 16:59:40 -0700291 {
weili9053f192016-11-18 14:03:49 -0800292 # Update the Mac toolchain if necessary.
293 'name': 'mac_toolchain',
294 'pattern': '.',
295 'action': ['python', 'pdfium/build/mac_toolchain.py'],
296 },
Tom Anderson4e8edf52017-03-30 18:27:21 -0700297 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000298 'name': 'msan_chained_origins',
299 'pattern': '.',
300 'condition': 'checkout_instrumented_libraries',
301 'action': [ 'python',
302 'pdfium/third_party/depot_tools/download_from_google_storage.py',
303 "--no_resume",
304 "--no_auth",
305 "--bucket", "chromium-instrumented-libraries",
306 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
307 ],
308 },
309 {
310 'name': 'msan_no_origins',
311 'pattern': '.',
312 'condition': 'checkout_instrumented_libraries',
313 'action': [ 'python',
314 'pdfium/third_party/depot_tools/download_from_google_storage.py',
315 "--no_resume",
316 "--no_auth",
317 "--bucket", "chromium-instrumented-libraries",
318 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
319 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700320 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700321]