blob: 26c8573542cf0442cf187b1136e1036e4415760b [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 Zhangb384c532019-05-28 07:02:29 +000016 'binutils_revision': '92bfa0a5dcee9dc01173e39e5bff226b09af0254',
Lei Zhang3ec47b62019-07-11 18:50:19 +000017 'build_revision': '95a2cff8feeab9d3ea06f7be01e29d8730c7d456',
Lei Zhang2420af42019-07-12 02:06:16 +000018 'buildtools_revision': '95c72f350fed4d9bc1929c65d0ca0e5f28615322',
Lei Zhang23f87162019-08-02 00:00:54 +000019 'catapult_revision': '2861f86d3c5a1dc98d49be0c4e91105600896b52',
Lei Zhangd6119be2019-07-09 20:31:57 +000020 'clang_revision': '7cefad2f8f24c452fc25a43360e97c84745406ef',
Lei Zhangecb00662019-05-28 07:17:30 +000021 'code_coverage_revision': 'b53d904eb74afb18f4ddc27db4f75552b1237514',
Lei Zhang6b9dc152019-08-02 00:10:34 +000022 'depot_tools_revision': '59bb8cce842ce937f07064f64f18a6f9192110de',
Lei Zhangdfccee72019-07-29 18:04:08 +000023 'freetype_revision': '12af46b649fdb946bacf150428e5cdfc3470a7ca',
Lei Zhang4521a2e2019-08-02 00:07:44 +000024 'gtest_revision': 'a45c24ac1878932e0dc5fbc0d78a699befd386d3',
Lei Zhang4f58afa2019-08-02 01:06:22 +000025 'icu_revision': '682a230923933a7157a41b88c7804b6b7d2abdfa',
Lei Zhang5b35e382018-11-10 07:20:21 +000026 'instrumented_lib_revision': 'a959e4f0cb643003f2d75d179cede449979e3e77',
Lei Zhang37dde5b2018-07-03 17:55:44 +000027 'jinja2_revision': '45571de473282bd1d8b63a8dfcb1fd268d0635d2',
Lei Zhang124e85e2019-08-02 00:03:34 +000028 'jpeg_turbo_revision': '81aef9014e059f9bf4838db49ba4fd47fd9d14ce',
Dale Curtisc758d9d2017-04-06 14:10:09 -070029 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Hui Yingst9231ac52019-07-10 20:59:39 +000030 'pdfium_tests_revision': '02dd653ec62649b6f1aa4e4526071cc32d903f54',
Lei Zhang2e5a58f2019-07-16 20:21:35 +000031 'skia_revision': '8590026dbf0d22291c8c42ed0eddb73d66da446d',
Lei Zhang3658d6d2018-07-03 18:02:19 +000032 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
Lei Zhange780e482019-07-08 20:12:16 +000033 'trace_event_revision': 'cfe8887fa6ac3170e23a68949930e28d4705a16f',
Lei Zhang4c1194a2019-07-11 18:48:29 +000034 'v8_revision': 'b6dda94d79dd9d7e5fe7b07b3a9b2b83c655896d',
Lei Zhangebfd26c2018-07-11 22:12:59 +000035 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhangaea51982019-08-01 23:46:14 +000036 'zlib_revision': '2b4888a46ae73eb1261efc924ac13fe2faa6c480',
Lei Zhangd5bcd372019-04-01 23:50:52 +000037
38 # GN CIPD package version.
39 'gn_version': 'git_revision:0790d3043387c762a6bacb1ae0a9ebe883188ab2',
Dan Sinclaira03c3432016-03-16 15:35:20 -040040}
41
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070042deps = {
thestig5fec5972016-08-30 06:39:40 -070043 "base/trace_event/common":
44 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
45 Var('trace_event_revision'),
46
dsinclair685bb882016-04-20 07:32:39 -070047 "build":
48 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070049
Tom Sepez4c0e2752015-06-05 13:46:08 -070050 "buildtools":
Lei Zhang8d161262019-03-21 19:06:30 +000051 Var('chromium_git') + "/chromium/src/buildtools.git@" +
Lei Zhangeb39cdb2017-03-31 12:26:15 -070052 Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070053
Lei Zhangd5bcd372019-04-01 23:50:52 +000054 'pdfium/buildtools/linux64': {
55 'packages': [
56 {
57 'package': 'gn/gn/linux-amd64',
58 'version': Var('gn_version'),
59 }
60 ],
61 'dep_type': 'cipd',
62 'condition': 'host_os == "linux"',
63 },
64
65 'pdfium/buildtools/mac': {
66 'packages': [
67 {
68 'package': 'gn/gn/mac-amd64',
69 'version': Var('gn_version'),
70 }
71 ],
72 'dep_type': 'cipd',
73 'condition': 'host_os == "mac"',
74 },
75
76 'pdfium/buildtools/win': {
77 'packages': [
78 {
79 'package': 'gn/gn/windows-amd64',
80 'version': Var('gn_version'),
81 }
82 ],
83 'dep_type': 'cipd',
84 'condition': 'host_os == "win"',
85 },
86
Tom Sepez9519ab22015-03-16 15:27:19 -070087 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040088 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070089
Lei Zhangcb7c1182019-03-21 17:48:18 +000090 "third_party/android_ndk": {
91 'url': Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
92 'condition': 'checkout_android',
93 },
94
Lei Zhangdfc08432017-12-21 07:37:15 +000095 "third_party/binutils":
96 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
97 Var('binutils_revision'),
98
Lei Zhangcb7c1182019-03-21 17:48:18 +000099 "third_party/catapult": {
100 'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
101 'condition': 'checkout_android',
102 },
103
Lei Zhangab384ed2017-12-21 08:00:44 +0000104 'third_party/depot_tools':
105 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
106 Var('depot_tools_revision'),
107
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700108 "third_party/freetype/src":
109 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
110 Var('freetype_revision'),
111
Lei Zhangc5514272018-03-22 05:19:14 +0000112 "third_party/googletest/src":
113 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
114 Var('gtest_revision'),
115
dsinclair685bb882016-04-20 07:32:39 -0700116 "third_party/icu":
117 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
118
weili62f36732016-10-14 16:59:40 -0700119 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700120 Var('chromium_git') +
121 "/chromium/src/third_party/instrumented_libraries.git@" +
122 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -0700123
Dale Curtisc758d9d2017-04-06 14:10:09 -0700124 "third_party/jinja2":
125 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
126 Var('jinja2_revision'),
127
128 "third_party/markupsafe":
129 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
130 Var('markupsafe_revision'),
131
Lei Zhang0e5d8922017-04-06 21:43:50 -0700132 "third_party/libjpeg_turbo":
133 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
134 Var('jpeg_turbo_revision'),
135
Dan Sinclaira03c3432016-03-16 15:35:20 -0400136 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700137 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -0800138
Lei Zhanga2af7de2017-03-31 13:33:12 -0700139 "third_party/zlib":
140 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
141 Var('zlib_revision'),
142
Lei Zhang0e5d8922017-04-06 21:43:50 -0700143 'third_party/yasm/source/patched-yasm':
144 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
145 Var('yasm_source_revision'),
146
Oliver Changafaa98e2015-10-21 15:29:47 -0700147 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -0700148 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -0700149
Ryan Harrisona7b65b82018-05-30 19:56:11 +0000150 "tools/code_coverage":
151 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
152 Var('code_coverage_revision'),
153
dsinclairfb969002016-05-31 12:55:32 -0700154 "tools/memory":
155 Var('chromium_git') + "/chromium/src/tools/memory@" +
156 Var('tools_memory_revision'),
157
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700158 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400159 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700160}
161
thestig3873f302016-09-28 17:39:26 -0700162recursedeps = [
163 # buildtools provides clang_format, libc++, and libc++abi
164 'buildtools',
165]
166
Tom Sepez4c0e2752015-06-05 13:46:08 -0700167include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800168 # Basic stuff that everyone can use.
169 # Note: public is not here because core cannot depend on public.
Lei Zhangf79e15b2019-03-19 23:15:50 +0000170 '+build/build_config.h',
Lei Zhang26170562018-04-17 17:01:52 +0000171 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700172 '+testing',
173 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700174]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700175
weili90c964f2016-04-22 15:25:14 -0700176specific_include_rules = {
177 # Allow embedder tests to use public APIs.
178 "(.*embeddertest\.cpp)": [
179 "+public",
180 ]
181}
182
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700183hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700184 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000185 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
186 'name': 'ciopfs_linux',
187 'pattern': '.',
188 'condition': 'checkout_win and host_os == "linux"',
189 'action': [ 'python',
190 'pdfium/third_party/depot_tools/download_from_google_storage.py',
191 '--no_resume',
192 '--no_auth',
193 '--bucket', 'chromium-browser-clang/ciopfs',
194 '-s', 'pdfium/build/ciopfs.sha1',
195 ]
196 },
197 {
198 # Update the Windows toolchain if necessary. Must run before 'clang' below.
199 'name': 'win_toolchain',
200 'pattern': '.',
201 'condition': 'checkout_win',
202 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
203 },
204 {
205 # Update the Mac toolchain if necessary.
206 'name': 'mac_toolchain',
207 'pattern': '.',
208 'action': ['python', 'pdfium/build/mac_toolchain.py'],
209 },
210 {
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]