blob: f0b86385f038c7728b1261f779c8dcb2d4051a27 [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 Zhang6f0d9142019-03-19 21:41:28 +000017 'build_revision': 'e51ca1d98734b400979f9fe5695e2ef76f334a80',
Lei Zhang4f9d0b52019-02-07 18:46:57 +000018 'buildtools_revision': '6fbda1b24c1893a893b17aa219b765b9e7c801d8',
Lei Zhang7e0b3912018-12-23 06:53:37 +000019 'catapult_revision': '7c1d51b169edfb62a3e2f88730f1182240cfe981',
Lei Zhangbde8dfd2019-03-19 19:08:44 +000020 'clang_revision': '207fd1e5dc049d231e12f4f0c8937b39ba549afb',
Lei Zhang6f1d6ec2019-03-19 22:35:59 +000021 'code_coverage_revision': '0e34d1463558f5a32308d0808e04e85cfe95f4a4',
Dan Sinclaira03c3432016-03-16 15:35:20 -040022 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Lei Zhangb0945972019-02-07 18:19:37 +000023 'depot_tools_revision': '06d1040fab75709fd0cbea3d3cbfa8774cb826f0',
Ben Wagner0cca8d62019-03-05 19:54:11 +000024 'freetype_revision': '31757f969fba60d75404f31e8f1168bef5011770',
Lei Zhangcbc01d02019-02-07 23:53:36 +000025 'gtest_revision': '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081',
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 Zhang19a3e3a2019-03-20 02:36:35 +000029 'jpeg_turbo_revision': '6dcdade8828297e306cabfdae80f3510f3f3eea2',
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 Zhang447754b2019-03-19 22:41:50 +000034 'trace_event_revision': '936ba8a963284a6b3737cf2f0474a7131073abee',
Lei Zhangb488d9c2019-03-19 19:30:35 +000035 'v8_revision': '93306f1d7b2c10824e1e8876e5b8a3ab37c42b96',
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 Zhangf79e15b2019-03-19 23:15:50 +0000138 '+build/build_config.h',
Lei Zhang26170562018-04-17 17:01:52 +0000139 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700140 '+testing',
141 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700142]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700143
weili90c964f2016-04-22 15:25:14 -0700144specific_include_rules = {
145 # Allow embedder tests to use public APIs.
146 "(.*embeddertest\.cpp)": [
147 "+public",
148 ]
149}
150
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700151hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700152 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000153 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
154 'name': 'ciopfs_linux',
155 'pattern': '.',
156 'condition': 'checkout_win and host_os == "linux"',
157 'action': [ 'python',
158 'pdfium/third_party/depot_tools/download_from_google_storage.py',
159 '--no_resume',
160 '--no_auth',
161 '--bucket', 'chromium-browser-clang/ciopfs',
162 '-s', 'pdfium/build/ciopfs.sha1',
163 ]
164 },
165 {
166 # Update the Windows toolchain if necessary. Must run before 'clang' below.
167 'name': 'win_toolchain',
168 'pattern': '.',
169 'condition': 'checkout_win',
170 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
171 },
172 {
173 # Update the Mac toolchain if necessary.
174 'name': 'mac_toolchain',
175 'pattern': '.',
176 'action': ['python', 'pdfium/build/mac_toolchain.py'],
177 },
178 {
dsinclairb4e87082016-04-20 12:18:16 -0700179 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700180 'action': [ 'download_from_google_storage',
181 '--no_resume',
182 '--platform=win32',
183 '--no_auth',
184 '--bucket', 'chromium-gn',
185 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
186 ],
187 },
188 {
189 'name': 'gn_mac',
190 'pattern': '.',
191 'action': [ 'download_from_google_storage',
192 '--no_resume',
193 '--platform=darwin',
194 '--no_auth',
195 '--bucket', 'chromium-gn',
196 '-s', 'pdfium/buildtools/mac/gn.sha1',
197 ],
198 },
199 {
200 'name': 'gn_linux64',
201 'pattern': '.',
202 'action': [ 'download_from_google_storage',
203 '--no_resume',
204 '--platform=linux*',
205 '--no_auth',
206 '--bucket', 'chromium-gn',
207 '-s', 'pdfium/buildtools/linux64/gn.sha1',
208 ],
209 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700210 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000211 # Pull clang-format binaries using checked-in hashes.
Tom Sepeze9446f82015-08-13 15:51:43 -0700212 'name': 'clang_format_win',
213 'pattern': '.',
214 'action': [ 'download_from_google_storage',
215 '--no_resume',
216 '--platform=win32',
217 '--no_auth',
218 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700219 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700220 ],
221 },
222 {
223 'name': 'clang_format_mac',
224 'pattern': '.',
225 'action': [ 'download_from_google_storage',
226 '--no_resume',
227 '--platform=darwin',
228 '--no_auth',
229 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700230 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700231 ],
232 },
233 {
234 'name': 'clang_format_linux',
235 'pattern': '.',
236 'action': [ 'download_from_google_storage',
237 '--no_resume',
238 '--platform=linux*',
239 '--no_auth',
240 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700241 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700242 ],
243 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700244 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000245 # Note: On Win, this should run after win_toolchain, as it may use it.
Oliver Changafaa98e2015-10-21 15:29:47 -0700246 'name': 'clang',
247 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700248 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700249 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700250 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700251 },
weili9a1b6652016-04-28 15:26:45 -0700252 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000253 'name': 'binutils',
254 'pattern': 'src/third_party/binutils',
255 'condition': 'host_os == "linux"',
256 'action': [
257 'python',
258 'pdfium/third_party/binutils/download.py',
259 ],
260 },
261 {
Lei Zhang728127c2018-02-16 19:26:20 +0000262 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700263 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000264 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700265 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000266 '--arch=arm'],
267 },
268 {
269 'name': 'sysroot_arm64',
270 'pattern': '.',
271 'condition': 'checkout_linux and checkout_arm64',
272 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
273 '--arch=arm64'],
274 },
275 {
276 'name': 'sysroot_x86',
277 'pattern': '.',
278 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
279 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
280 '--arch=x86'],
281 },
282 {
283 'name': 'sysroot_mips',
284 'pattern': '.',
285 'condition': 'checkout_linux and checkout_mips',
286 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
287 '--arch=mips'],
288 },
289 {
290 'name': 'sysroot_x64',
291 'pattern': '.',
292 'condition': 'checkout_linux and checkout_x64',
293 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
294 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700295 },
296 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000297 'name': 'msan_chained_origins',
298 'pattern': '.',
299 'condition': 'checkout_instrumented_libraries',
300 'action': [ 'python',
301 'pdfium/third_party/depot_tools/download_from_google_storage.py',
302 "--no_resume",
303 "--no_auth",
304 "--bucket", "chromium-instrumented-libraries",
305 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
306 ],
307 },
308 {
309 'name': 'msan_no_origins',
310 'pattern': '.',
311 'condition': 'checkout_instrumented_libraries',
312 'action': [ 'python',
313 'pdfium/third_party/depot_tools/download_from_google_storage.py',
314 "--no_resume",
315 "--no_auth",
316 "--bucket", "chromium-instrumented-libraries",
317 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
318 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700319 },
Lei Zhangd3220622018-08-27 17:43:10 +0000320 {
321 # Update LASTCHANGE.
322 'name': 'lastchange',
323 'pattern': '.',
324 'action': ['python', 'pdfium/build/util/lastchange.py',
325 '-o', 'pdfium/build/util/LASTCHANGE'],
326 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700327]