blob: 0ea5a9ff74acd6a8de9d1827b9242612cb983f11 [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
Lei Zhang10e117e2019-01-19 05:54:34 +000010 'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration != "small"',
Lei Zhangab384ed2017-12-21 08:00:44 +000011
Dan Sinclaira03c3432016-03-16 15:35:20 -040012 'chromium_git': 'https://chromium.googlesource.com',
13 'pdfium_git': 'https://pdfium.googlesource.com',
14
Lei Zhang92770e82018-12-23 06:55:27 +000015 'android_ndk_revision': '4e2cea441bfd43f0863d14f57b1e1844260b9884',
Lei Zhangf4f8cc52018-12-11 01:37:45 +000016 'binutils_revision': '2be73f7fbf783d7a0b288e174a5773b67c7656bc',
Lei Zhang69aa1ac2019-02-07 18:02:30 +000017 'build_revision': '213e0a3a3d17d89b6513181a28956166a9c2141c',
Lei Zhang4f9d0b52019-02-07 18:46:57 +000018 'buildtools_revision': '6fbda1b24c1893a893b17aa219b765b9e7c801d8',
Lei Zhang7e0b3912018-12-23 06:53:37 +000019 'catapult_revision': '7c1d51b169edfb62a3e2f88730f1182240cfe981',
Lei Zhang69aa1ac2019-02-07 18:02:30 +000020 'clang_revision': '3a16568a56486d7d032b8ec7b8dae892413a9a7a',
Lei Zhanga09bfbf2018-12-23 03:59:30 +000021 'code_coverage_revision': '16298755a926f419babc4a11ccfeae0035f48c3f',
Dan Sinclaira03c3432016-03-16 15:35:20 -040022 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Lei Zhangb0945972019-02-07 18:19:37 +000023 'depot_tools_revision': '06d1040fab75709fd0cbea3d3cbfa8774cb826f0',
Ben Wagner2593e712019-02-06 19:00:52 +000024 'freetype_revision': 'b66d6a91123c891978ac7cc5e28943b24b8e11d6',
Lei Zhangbed82822018-12-23 04:44:56 +000025 'gtest_revision': '879ac092fde0a19e1b3a61b2546b2a422b1528bc',
Lei Zhangc34e09d2019-01-19 06:29:21 +000026 'icu_revision': '07e7295d964399ee7bee16a3ac7ca5a053b2cf0a',
Lei Zhang5b35e382018-11-10 07:20:21 +000027 'instrumented_lib_revision': 'a959e4f0cb643003f2d75d179cede449979e3e77',
Lei Zhang37dde5b2018-07-03 17:55:44 +000028 'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2',
Lei Zhang690faf72018-09-15 04:58:36 +000029 'jpeg_turbo_revision': '61a2bbaa9aec89cb2c882d87ace6aba9aee49bb9',
Dale Curtisc758d9d2017-04-06 14:10:09 -070030 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Lei Zhang69066ab2018-10-29 20:44:27 +000031 'pdfium_tests_revision': '5a68e87859476eb75d3e068bd406c4921a6be8e2',
Lei Zhangce4cd632019-02-04 19:17:38 +000032 'skia_revision': 'ea8900e74ea7d817ce49cc684aa49946dd659af1',
Lei Zhang3658d6d2018-07-03 18:02:19 +000033 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
Lei Zhang27c8aef2018-07-03 17:55:04 +000034 'trace_event_revision': '211b3ed9d0481b4caddbee1322321b86a483ca1f',
Lei Zhang7783b0f2019-01-19 07:01:35 +000035 'v8_revision': '817547547ebebdb1d53edddd745bf5f1c16f525d',
Lei Zhangebfd26c2018-07-11 22:12:59 +000036 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhangb15f7bf2019-01-19 06:10:20 +000037 'zlib_revision': 'e080c76be8c127cd977e49d64246fd98e67b35e6',
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
Ryan Harrisona7b65b82018-05-30 19:56:11 +0000105 "tools/code_coverage":
106 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
107 Var('code_coverage_revision'),
108
dsinclairfb969002016-05-31 12:55:32 -0700109 "tools/memory":
110 Var('chromium_git') + "/chromium/src/tools/memory@" +
111 Var('tools_memory_revision'),
112
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700113 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400114 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700115}
116
117deps_os = {
jbudorick7f3a15f2016-06-10 06:28:40 -0700118 "android": {
119 "third_party/android_ndk":
120 Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
121 "third_party/catapult":
Lei Zhangd64fa442018-12-23 06:52:57 +0000122 Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
jbudorick7f3a15f2016-06-10 06:28:40 -0700123 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700124 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700125 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400126 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700127 },
128}
Tom Sepez4c0e2752015-06-05 13:46:08 -0700129
thestig3873f302016-09-28 17:39:26 -0700130recursedeps = [
131 # buildtools provides clang_format, libc++, and libc++abi
132 'buildtools',
133]
134
Tom Sepez4c0e2752015-06-05 13:46:08 -0700135include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800136 # Basic stuff that everyone can use.
137 # Note: public is not here because core cannot depend on public.
Lei Zhang26170562018-04-17 17:01:52 +0000138 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700139 '+testing',
140 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700141]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700142
weili90c964f2016-04-22 15:25:14 -0700143specific_include_rules = {
144 # Allow embedder tests to use public APIs.
145 "(.*embeddertest\.cpp)": [
146 "+public",
147 ]
148}
149
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700150hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700151 {
dsinclairb4e87082016-04-20 12:18:16 -0700152 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700153 'action': [ 'download_from_google_storage',
154 '--no_resume',
155 '--platform=win32',
156 '--no_auth',
157 '--bucket', 'chromium-gn',
158 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
159 ],
160 },
161 {
162 'name': 'gn_mac',
163 'pattern': '.',
164 'action': [ 'download_from_google_storage',
165 '--no_resume',
166 '--platform=darwin',
167 '--no_auth',
168 '--bucket', 'chromium-gn',
169 '-s', 'pdfium/buildtools/mac/gn.sha1',
170 ],
171 },
172 {
173 'name': 'gn_linux64',
174 'pattern': '.',
175 'action': [ 'download_from_google_storage',
176 '--no_resume',
177 '--platform=linux*',
178 '--no_auth',
179 '--bucket', 'chromium-gn',
180 '-s', 'pdfium/buildtools/linux64/gn.sha1',
181 ],
182 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700183 # Pull clang-format binaries using checked-in hashes.
184 {
185 'name': 'clang_format_win',
186 'pattern': '.',
187 'action': [ 'download_from_google_storage',
188 '--no_resume',
189 '--platform=win32',
190 '--no_auth',
191 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700192 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700193 ],
194 },
195 {
196 'name': 'clang_format_mac',
197 'pattern': '.',
198 'action': [ 'download_from_google_storage',
199 '--no_resume',
200 '--platform=darwin',
201 '--no_auth',
202 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700203 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700204 ],
205 },
206 {
207 'name': 'clang_format_linux',
208 'pattern': '.',
209 'action': [ 'download_from_google_storage',
210 '--no_resume',
211 '--platform=linux*',
212 '--no_auth',
213 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700214 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700215 ],
216 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700217 {
dsinclairb12fbdde2016-09-19 10:45:14 -0700218 # Pull clang
Oliver Changafaa98e2015-10-21 15:29:47 -0700219 'name': 'clang',
220 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700221 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700222 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700223 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700224 },
weili9a1b6652016-04-28 15:26:45 -0700225 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000226 'name': 'binutils',
227 'pattern': 'src/third_party/binutils',
228 'condition': 'host_os == "linux"',
229 'action': [
230 'python',
231 'pdfium/third_party/binutils/download.py',
232 ],
233 },
234 {
Lei Zhang728127c2018-02-16 19:26:20 +0000235 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700236 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000237 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700238 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000239 '--arch=arm'],
240 },
241 {
242 'name': 'sysroot_arm64',
243 'pattern': '.',
244 'condition': 'checkout_linux and checkout_arm64',
245 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
246 '--arch=arm64'],
247 },
248 {
249 'name': 'sysroot_x86',
250 'pattern': '.',
251 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
252 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
253 '--arch=x86'],
254 },
255 {
256 'name': 'sysroot_mips',
257 'pattern': '.',
258 'condition': 'checkout_linux and checkout_mips',
259 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
260 '--arch=mips'],
261 },
262 {
263 'name': 'sysroot_x64',
264 'pattern': '.',
265 'condition': 'checkout_linux and checkout_x64',
266 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
267 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700268 },
269 {
Lei Zhang451c9b42018-02-21 10:35:20 +0000270 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
271 'name': 'ciopfs_linux',
272 'pattern': '.',
273 'condition': 'checkout_win and host_os == "linux"',
274 'action': [ 'python',
275 'pdfium/third_party/depot_tools/download_from_google_storage.py',
276 '--no_resume',
277 '--no_auth',
278 '--bucket', 'chromium-browser-clang/ciopfs',
279 '-s', 'pdfium/build/ciopfs.sha1',
280 ]
281 },
282 {
weili9a1b6652016-04-28 15:26:45 -0700283 # Update the Windows toolchain if necessary.
284 'name': 'win_toolchain',
285 'pattern': '.',
Lei Zhang63579f92017-12-21 19:18:00 -0800286 'condition': 'checkout_win',
Lei Zhang451c9b42018-02-21 10:35:20 +0000287 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
weili9a1b6652016-04-28 15:26:45 -0700288 },
weili62f36732016-10-14 16:59:40 -0700289 {
weili9053f192016-11-18 14:03:49 -0800290 # Update the Mac toolchain if necessary.
291 'name': 'mac_toolchain',
292 'pattern': '.',
293 'action': ['python', 'pdfium/build/mac_toolchain.py'],
294 },
Tom Anderson4e8edf52017-03-30 18:27:21 -0700295 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000296 'name': 'msan_chained_origins',
297 'pattern': '.',
298 'condition': 'checkout_instrumented_libraries',
299 'action': [ 'python',
300 'pdfium/third_party/depot_tools/download_from_google_storage.py',
301 "--no_resume",
302 "--no_auth",
303 "--bucket", "chromium-instrumented-libraries",
304 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
305 ],
306 },
307 {
308 'name': 'msan_no_origins',
309 'pattern': '.',
310 'condition': 'checkout_instrumented_libraries',
311 'action': [ 'python',
312 'pdfium/third_party/depot_tools/download_from_google_storage.py',
313 "--no_resume",
314 "--no_auth",
315 "--bucket", "chromium-instrumented-libraries",
316 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
317 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700318 },
Lei Zhangd3220622018-08-27 17:43:10 +0000319 {
320 # Update LASTCHANGE.
321 'name': 'lastchange',
322 'pattern': '.',
323 'action': ['python', 'pdfium/build/util/lastchange.py',
324 '-o', 'pdfium/build/util/LASTCHANGE'],
325 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700326]