blob: 7ccb4b36dfac55aedbc66d9e3b6cafd9e939103f [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
Tom Anderson16ccc8b2018-05-30 01:53:00 +000016 'android_ndk_revision': '5cd86312e794bdf542a3685c6f10cbb96072990b',
Lei Zhang13261e82018-08-22 01:53:24 +000017 'binutils_revision': '4110e09197116a9c5dedd4c827bbe95c224f87ac',
Lei Zhang33b1ceb2018-10-06 07:19:48 +000018 'build_revision': 'a092193873452162c2288536cea2ac2ed82e159f',
Lei Zhangb6e7d492018-08-30 20:19:29 +000019 'buildtools_revision': '2dff9c9c74e9d732e6fe57c84ef7fd044cc45d96',
Lei Zhang3b3da2c2018-09-15 04:46:41 +000020 'catapult_revision': '9f36d9f788130761c3611060bc7a104772761d15',
Lei Zhang33b1ceb2018-10-06 07:19:48 +000021 'clang_revision': '7792d28b069af6dd3a86d1ba83b7f5c4ede605dc',
Lei Zhang75616922018-10-06 06:51:06 +000022 'code_coverage_revision': '4191ea0675c4c133cb506316b6b974f31e600576',
Dan Sinclaira03c3432016-03-16 15:35:20 -040023 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Lei Zhangf1e8b462018-10-06 06:51:58 +000024 'depot_tools_revision': '71e3be7a50c21faeee91ed99a8d5addfb7594e7c',
Lei Zhang2b47da92018-09-25 20:24:20 +000025 'freetype_revision': 'abd997aa7cf2bc9219136782c7363d14d325199c',
Lei Zhang37d04452018-08-22 01:52:05 +000026 'gtest_revision': 'd5266326752f0a1dadbd310932d8f4fd8c3c5e7d',
Lei Zhangbe1b71a2018-08-31 16:21:43 +000027 'icu_revision': 'c56c671998902fcc4fc9ace88c83daa99f980793',
Lei Zhang7212f322018-03-19 22:08:37 +000028 'instrumented_lib_revision': '323cf32193caecbf074d1a0cb5b02b905f163e0f',
Lei Zhang37dde5b2018-07-03 17:55:44 +000029 'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2',
Lei Zhang690faf72018-09-15 04:58:36 +000030 'jpeg_turbo_revision': '61a2bbaa9aec89cb2c882d87ace6aba9aee49bb9',
Dale Curtisc758d9d2017-04-06 14:10:09 -070031 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Lei Zhang69066ab2018-10-29 20:44:27 +000032 'pdfium_tests_revision': '5a68e87859476eb75d3e068bd406c4921a6be8e2',
Lei Zhangc15c0b32018-07-18 20:28:00 +000033 'skia_revision': '588f879677d4f36e16a42dd96876534f104c2e2f',
Lei Zhang3658d6d2018-07-03 18:02:19 +000034 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
Lei Zhang27c8aef2018-07-03 17:55:04 +000035 'trace_event_revision': '211b3ed9d0481b4caddbee1322321b86a483ca1f',
Lei Zhange027c972018-10-26 21:36:42 +000036 'v8_revision': 'a4f6a37da361b69c87c9230152d8cfb8ce351428',
Lei Zhangebfd26c2018-07-11 22:12:59 +000037 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhang03216f72018-08-22 01:53:44 +000038 'zlib_revision': 'dcf1d0f8c952f76cfceefb4ba61e004f93ad7287',
Dan Sinclaira03c3432016-03-16 15:35:20 -040039}
40
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070041deps = {
thestig5fec5972016-08-30 06:39:40 -070042 "base/trace_event/common":
43 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
44 Var('trace_event_revision'),
45
dsinclair685bb882016-04-20 07:32:39 -070046 "build":
47 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070048
Tom Sepez4c0e2752015-06-05 13:46:08 -070049 "buildtools":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070050 Var('chromium_git') + "/chromium/buildtools.git@" +
51 Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070052
Tom Sepez9519ab22015-03-16 15:27:19 -070053 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040054 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070055
Lei Zhangdfc08432017-12-21 07:37:15 +000056 "third_party/binutils":
57 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
58 Var('binutils_revision'),
59
Lei Zhangab384ed2017-12-21 08:00:44 +000060 'third_party/depot_tools':
61 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
62 Var('depot_tools_revision'),
63
Lei Zhangeb39cdb2017-03-31 12:26:15 -070064 "third_party/freetype/src":
65 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
66 Var('freetype_revision'),
67
Lei Zhangc5514272018-03-22 05:19:14 +000068 "third_party/googletest/src":
69 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
70 Var('gtest_revision'),
71
dsinclair685bb882016-04-20 07:32:39 -070072 "third_party/icu":
73 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
74
weili62f36732016-10-14 16:59:40 -070075 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070076 Var('chromium_git') +
77 "/chromium/src/third_party/instrumented_libraries.git@" +
78 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -070079
Dale Curtisc758d9d2017-04-06 14:10:09 -070080 "third_party/jinja2":
81 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
82 Var('jinja2_revision'),
83
84 "third_party/markupsafe":
85 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
86 Var('markupsafe_revision'),
87
Lei Zhang0e5d8922017-04-06 21:43:50 -070088 "third_party/libjpeg_turbo":
89 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
90 Var('jpeg_turbo_revision'),
91
Dan Sinclaira03c3432016-03-16 15:35:20 -040092 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070093 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080094
Lei Zhanga2af7de2017-03-31 13:33:12 -070095 "third_party/zlib":
96 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
97 Var('zlib_revision'),
98
Lei Zhang0e5d8922017-04-06 21:43:50 -070099 'third_party/yasm/source/patched-yasm':
100 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
101 Var('yasm_source_revision'),
102
Oliver Changafaa98e2015-10-21 15:29:47 -0700103 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -0700104 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -0700105
Ryan Harrisona7b65b82018-05-30 19:56:11 +0000106 "tools/code_coverage":
107 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
108 Var('code_coverage_revision'),
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.
Lei Zhang26170562018-04-17 17:01:52 +0000141 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700142 '+testing',
143 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700144]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700145
weili90c964f2016-04-22 15:25:14 -0700146specific_include_rules = {
147 # Allow embedder tests to use public APIs.
148 "(.*embeddertest\.cpp)": [
149 "+public",
150 ]
151}
152
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700153hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700154 {
dsinclairb4e87082016-04-20 12:18:16 -0700155 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700156 'action': [ 'download_from_google_storage',
157 '--no_resume',
158 '--platform=win32',
159 '--no_auth',
160 '--bucket', 'chromium-gn',
161 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
162 ],
163 },
164 {
165 'name': 'gn_mac',
166 'pattern': '.',
167 'action': [ 'download_from_google_storage',
168 '--no_resume',
169 '--platform=darwin',
170 '--no_auth',
171 '--bucket', 'chromium-gn',
172 '-s', 'pdfium/buildtools/mac/gn.sha1',
173 ],
174 },
175 {
176 'name': 'gn_linux64',
177 'pattern': '.',
178 'action': [ 'download_from_google_storage',
179 '--no_resume',
180 '--platform=linux*',
181 '--no_auth',
182 '--bucket', 'chromium-gn',
183 '-s', 'pdfium/buildtools/linux64/gn.sha1',
184 ],
185 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700186 # Pull clang-format binaries using checked-in hashes.
187 {
188 'name': 'clang_format_win',
189 'pattern': '.',
190 'action': [ 'download_from_google_storage',
191 '--no_resume',
192 '--platform=win32',
193 '--no_auth',
194 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700195 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700196 ],
197 },
198 {
199 'name': 'clang_format_mac',
200 'pattern': '.',
201 'action': [ 'download_from_google_storage',
202 '--no_resume',
203 '--platform=darwin',
204 '--no_auth',
205 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700206 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700207 ],
208 },
209 {
210 'name': 'clang_format_linux',
211 'pattern': '.',
212 'action': [ 'download_from_google_storage',
213 '--no_resume',
214 '--platform=linux*',
215 '--no_auth',
216 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700217 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700218 ],
219 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700220 {
dsinclairb12fbdde2016-09-19 10:45:14 -0700221 # Pull clang
Oliver Changafaa98e2015-10-21 15:29:47 -0700222 'name': 'clang',
223 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700224 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700225 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700226 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700227 },
weili9a1b6652016-04-28 15:26:45 -0700228 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000229 'name': 'binutils',
230 'pattern': 'src/third_party/binutils',
231 'condition': 'host_os == "linux"',
232 'action': [
233 'python',
234 'pdfium/third_party/binutils/download.py',
235 ],
236 },
237 {
Lei Zhang728127c2018-02-16 19:26:20 +0000238 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700239 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000240 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700241 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000242 '--arch=arm'],
243 },
244 {
245 'name': 'sysroot_arm64',
246 'pattern': '.',
247 'condition': 'checkout_linux and checkout_arm64',
248 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
249 '--arch=arm64'],
250 },
251 {
252 'name': 'sysroot_x86',
253 'pattern': '.',
254 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
255 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
256 '--arch=x86'],
257 },
258 {
259 'name': 'sysroot_mips',
260 'pattern': '.',
261 'condition': 'checkout_linux and checkout_mips',
262 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
263 '--arch=mips'],
264 },
265 {
266 'name': 'sysroot_x64',
267 'pattern': '.',
268 'condition': 'checkout_linux and checkout_x64',
269 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
270 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700271 },
272 {
Lei Zhang451c9b42018-02-21 10:35:20 +0000273 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
274 'name': 'ciopfs_linux',
275 'pattern': '.',
276 'condition': 'checkout_win and host_os == "linux"',
277 'action': [ 'python',
278 'pdfium/third_party/depot_tools/download_from_google_storage.py',
279 '--no_resume',
280 '--no_auth',
281 '--bucket', 'chromium-browser-clang/ciopfs',
282 '-s', 'pdfium/build/ciopfs.sha1',
283 ]
284 },
285 {
weili9a1b6652016-04-28 15:26:45 -0700286 # Update the Windows toolchain if necessary.
287 'name': 'win_toolchain',
288 'pattern': '.',
Lei Zhang63579f92017-12-21 19:18:00 -0800289 'condition': 'checkout_win',
Lei Zhang451c9b42018-02-21 10:35:20 +0000290 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
weili9a1b6652016-04-28 15:26:45 -0700291 },
weili62f36732016-10-14 16:59:40 -0700292 {
weili9053f192016-11-18 14:03:49 -0800293 # Update the Mac toolchain if necessary.
294 'name': 'mac_toolchain',
295 'pattern': '.',
296 'action': ['python', 'pdfium/build/mac_toolchain.py'],
297 },
Tom Anderson4e8edf52017-03-30 18:27:21 -0700298 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000299 'name': 'msan_chained_origins',
300 'pattern': '.',
301 'condition': 'checkout_instrumented_libraries',
302 'action': [ 'python',
303 'pdfium/third_party/depot_tools/download_from_google_storage.py',
304 "--no_resume",
305 "--no_auth",
306 "--bucket", "chromium-instrumented-libraries",
307 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
308 ],
309 },
310 {
311 'name': 'msan_no_origins',
312 'pattern': '.',
313 'condition': 'checkout_instrumented_libraries',
314 'action': [ 'python',
315 'pdfium/third_party/depot_tools/download_from_google_storage.py',
316 "--no_resume",
317 "--no_auth",
318 "--bucket", "chromium-instrumented-libraries",
319 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
320 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700321 },
Lei Zhangd3220622018-08-27 17:43:10 +0000322 {
323 # Update LASTCHANGE.
324 'name': 'lastchange',
325 'pattern': '.',
326 'action': ['python', 'pdfium/build/util/lastchange.py',
327 '-o', 'pdfium/build/util/LASTCHANGE'],
328 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700329]