blob: a2ec0e31327dfc904a6bb33017e77b6ba5d34caa [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',
Lei Zhang4c59ad02019-03-20 02:52:35 +000022 'depot_tools_revision': '3580425baa288b482c1fe2155c005736b7abc372',
Ben Wagner0cca8d62019-03-05 19:54:11 +000023 'freetype_revision': '31757f969fba60d75404f31e8f1168bef5011770',
Lei Zhang715df342019-03-20 02:48:45 +000024 'gtest_revision': '8b6d3f9c4a774bef3081195d422993323b6bb2e0',
Lei Zhang9cd22d22019-03-20 02:49:45 +000025 'icu_revision': '8c67416ccb4da42d817e7081ff83a2193b1aabe7',
Lei Zhang5b35e382018-11-10 07:20:21 +000026 'instrumented_lib_revision': 'a959e4f0cb643003f2d75d179cede449979e3e77',
Lei Zhang37dde5b2018-07-03 17:55:44 +000027 'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2',
Lei Zhang19a3e3a2019-03-20 02:36:35 +000028 'jpeg_turbo_revision': '6dcdade8828297e306cabfdae80f3510f3f3eea2',
Dale Curtisc758d9d2017-04-06 14:10:09 -070029 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Lei Zhang69066ab2018-10-29 20:44:27 +000030 'pdfium_tests_revision': '5a68e87859476eb75d3e068bd406c4921a6be8e2',
Lei Zhangce4cd632019-02-04 19:17:38 +000031 'skia_revision': 'ea8900e74ea7d817ce49cc684aa49946dd659af1',
Lei Zhang3658d6d2018-07-03 18:02:19 +000032 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
Lei Zhang447754b2019-03-19 22:41:50 +000033 'trace_event_revision': '936ba8a963284a6b3737cf2f0474a7131073abee',
Lei Zhangb488d9c2019-03-19 19:30:35 +000034 'v8_revision': '93306f1d7b2c10824e1e8876e5b8a3ab37c42b96',
Lei Zhangebfd26c2018-07-11 22:12:59 +000035 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhang9289c412019-03-20 02:40:55 +000036 'zlib_revision': '1337da5314a9716c0653301cceeb835d17fd7ea4',
Dan Sinclaira03c3432016-03-16 15:35:20 -040037}
38
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070039deps = {
thestig5fec5972016-08-30 06:39:40 -070040 "base/trace_event/common":
41 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
42 Var('trace_event_revision'),
43
dsinclair685bb882016-04-20 07:32:39 -070044 "build":
45 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070046
Tom Sepez4c0e2752015-06-05 13:46:08 -070047 "buildtools":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070048 Var('chromium_git') + "/chromium/buildtools.git@" +
49 Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070050
Tom Sepez9519ab22015-03-16 15:27:19 -070051 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040052 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070053
Lei Zhangcb7c1182019-03-21 17:48:18 +000054 "third_party/android_ndk": {
55 'url': Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
56 'condition': 'checkout_android',
57 },
58
Lei Zhangdfc08432017-12-21 07:37:15 +000059 "third_party/binutils":
60 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
61 Var('binutils_revision'),
62
Lei Zhangcb7c1182019-03-21 17:48:18 +000063 "third_party/catapult": {
64 'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
65 'condition': 'checkout_android',
66 },
67
Lei Zhangab384ed2017-12-21 08:00:44 +000068 'third_party/depot_tools':
69 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
70 Var('depot_tools_revision'),
71
Lei Zhangeb39cdb2017-03-31 12:26:15 -070072 "third_party/freetype/src":
73 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
74 Var('freetype_revision'),
75
Lei Zhangc5514272018-03-22 05:19:14 +000076 "third_party/googletest/src":
77 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
78 Var('gtest_revision'),
79
dsinclair685bb882016-04-20 07:32:39 -070080 "third_party/icu":
81 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
82
weili62f36732016-10-14 16:59:40 -070083 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070084 Var('chromium_git') +
85 "/chromium/src/third_party/instrumented_libraries.git@" +
86 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -070087
Dale Curtisc758d9d2017-04-06 14:10:09 -070088 "third_party/jinja2":
89 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
90 Var('jinja2_revision'),
91
92 "third_party/markupsafe":
93 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
94 Var('markupsafe_revision'),
95
Lei Zhang0e5d8922017-04-06 21:43:50 -070096 "third_party/libjpeg_turbo":
97 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
98 Var('jpeg_turbo_revision'),
99
Dan Sinclaira03c3432016-03-16 15:35:20 -0400100 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700101 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -0800102
Lei Zhanga2af7de2017-03-31 13:33:12 -0700103 "third_party/zlib":
104 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
105 Var('zlib_revision'),
106
Lei Zhang0e5d8922017-04-06 21:43:50 -0700107 'third_party/yasm/source/patched-yasm':
108 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
109 Var('yasm_source_revision'),
110
Oliver Changafaa98e2015-10-21 15:29:47 -0700111 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -0700112 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -0700113
Ryan Harrisona7b65b82018-05-30 19:56:11 +0000114 "tools/code_coverage":
115 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
116 Var('code_coverage_revision'),
117
dsinclairfb969002016-05-31 12:55:32 -0700118 "tools/memory":
119 Var('chromium_git') + "/chromium/src/tools/memory@" +
120 Var('tools_memory_revision'),
121
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700122 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400123 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700124}
125
thestig3873f302016-09-28 17:39:26 -0700126recursedeps = [
127 # buildtools provides clang_format, libc++, and libc++abi
128 'buildtools',
129]
130
Tom Sepez4c0e2752015-06-05 13:46:08 -0700131include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800132 # Basic stuff that everyone can use.
133 # Note: public is not here because core cannot depend on public.
Lei Zhangf79e15b2019-03-19 23:15:50 +0000134 '+build/build_config.h',
Lei Zhang26170562018-04-17 17:01:52 +0000135 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700136 '+testing',
137 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700138]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700139
weili90c964f2016-04-22 15:25:14 -0700140specific_include_rules = {
141 # Allow embedder tests to use public APIs.
142 "(.*embeddertest\.cpp)": [
143 "+public",
144 ]
145}
146
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700147hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700148 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000149 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
150 'name': 'ciopfs_linux',
151 'pattern': '.',
152 'condition': 'checkout_win and host_os == "linux"',
153 'action': [ 'python',
154 'pdfium/third_party/depot_tools/download_from_google_storage.py',
155 '--no_resume',
156 '--no_auth',
157 '--bucket', 'chromium-browser-clang/ciopfs',
158 '-s', 'pdfium/build/ciopfs.sha1',
159 ]
160 },
161 {
162 # Update the Windows toolchain if necessary. Must run before 'clang' below.
163 'name': 'win_toolchain',
164 'pattern': '.',
165 'condition': 'checkout_win',
166 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
167 },
168 {
169 # Update the Mac toolchain if necessary.
170 'name': 'mac_toolchain',
171 'pattern': '.',
172 'action': ['python', 'pdfium/build/mac_toolchain.py'],
173 },
174 {
dsinclairb4e87082016-04-20 12:18:16 -0700175 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700176 'action': [ 'download_from_google_storage',
177 '--no_resume',
178 '--platform=win32',
179 '--no_auth',
180 '--bucket', 'chromium-gn',
181 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
182 ],
183 },
184 {
185 'name': 'gn_mac',
186 'pattern': '.',
187 'action': [ 'download_from_google_storage',
188 '--no_resume',
189 '--platform=darwin',
190 '--no_auth',
191 '--bucket', 'chromium-gn',
192 '-s', 'pdfium/buildtools/mac/gn.sha1',
193 ],
194 },
195 {
196 'name': 'gn_linux64',
197 'pattern': '.',
198 'action': [ 'download_from_google_storage',
199 '--no_resume',
200 '--platform=linux*',
201 '--no_auth',
202 '--bucket', 'chromium-gn',
203 '-s', 'pdfium/buildtools/linux64/gn.sha1',
204 ],
205 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700206 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000207 # Pull clang-format binaries using checked-in hashes.
Tom Sepeze9446f82015-08-13 15:51:43 -0700208 'name': 'clang_format_win',
209 'pattern': '.',
210 'action': [ 'download_from_google_storage',
211 '--no_resume',
212 '--platform=win32',
213 '--no_auth',
214 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700215 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700216 ],
217 },
218 {
219 'name': 'clang_format_mac',
220 'pattern': '.',
221 'action': [ 'download_from_google_storage',
222 '--no_resume',
223 '--platform=darwin',
224 '--no_auth',
225 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700226 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700227 ],
228 },
229 {
230 'name': 'clang_format_linux',
231 'pattern': '.',
232 'action': [ 'download_from_google_storage',
233 '--no_resume',
234 '--platform=linux*',
235 '--no_auth',
236 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700237 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700238 ],
239 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700240 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000241 # Note: On Win, this should run after win_toolchain, as it may use it.
Oliver Changafaa98e2015-10-21 15:29:47 -0700242 'name': 'clang',
243 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700244 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700245 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700246 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700247 },
weili9a1b6652016-04-28 15:26:45 -0700248 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000249 'name': 'binutils',
250 'pattern': 'src/third_party/binutils',
251 'condition': 'host_os == "linux"',
252 'action': [
253 'python',
254 'pdfium/third_party/binutils/download.py',
255 ],
256 },
257 {
Lei Zhang728127c2018-02-16 19:26:20 +0000258 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700259 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000260 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700261 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000262 '--arch=arm'],
263 },
264 {
265 'name': 'sysroot_arm64',
266 'pattern': '.',
267 'condition': 'checkout_linux and checkout_arm64',
268 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
269 '--arch=arm64'],
270 },
271 {
272 'name': 'sysroot_x86',
273 'pattern': '.',
274 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
275 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
276 '--arch=x86'],
277 },
278 {
279 'name': 'sysroot_mips',
280 'pattern': '.',
281 'condition': 'checkout_linux and checkout_mips',
282 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
283 '--arch=mips'],
284 },
285 {
286 'name': 'sysroot_x64',
287 'pattern': '.',
288 'condition': 'checkout_linux and checkout_x64',
289 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
290 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700291 },
292 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000293 'name': 'msan_chained_origins',
294 'pattern': '.',
295 'condition': 'checkout_instrumented_libraries',
296 'action': [ 'python',
297 'pdfium/third_party/depot_tools/download_from_google_storage.py',
298 "--no_resume",
299 "--no_auth",
300 "--bucket", "chromium-instrumented-libraries",
301 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
302 ],
303 },
304 {
305 'name': 'msan_no_origins',
306 'pattern': '.',
307 'condition': 'checkout_instrumented_libraries',
308 'action': [ 'python',
309 'pdfium/third_party/depot_tools/download_from_google_storage.py',
310 "--no_resume",
311 "--no_auth",
312 "--bucket", "chromium-instrumented-libraries",
313 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
314 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700315 },
Lei Zhangd3220622018-08-27 17:43:10 +0000316 {
317 # Update LASTCHANGE.
318 'name': 'lastchange',
319 'pattern': '.',
320 'action': ['python', 'pdfium/build/util/lastchange.py',
321 '-o', 'pdfium/build/util/LASTCHANGE'],
322 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700323]