blob: a93928220815ab51f5fac1f3c5b4fc1aa272298e [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 Zhangea8c1212020-01-15 23:31:34 +000015 'android_ndk_revision': '27c0a8d090c666a50e40fceb4ee5b40b1a2d3f87',
Lei Zhange72921a2019-09-10 08:11:54 +000016 'binutils_revision': '01aa7745b0bab64ae22600f09fd6483c60f22ebf',
Lei Zhangafc43442020-01-16 01:28:16 +000017 'build_revision': '1bee638a8c4a9481ea06df4982d69488d0a5626d',
Lei Zhang6e57a492020-01-16 00:50:03 +000018 'buildtools_revision': '1f38b432e5630619f3aba0a22b9b63d606aee35a',
Lei Zhang09c44f12020-01-16 00:08:14 +000019 'catapult_revision': 'f7d73bb520283d2a06b8fde8a1b02aa33414fcd0',
Lei Zhangc86e3562020-01-16 01:37:05 +000020 'clang_revision': '42fbdfef1ce265b09dc6bda2ed90d83324c97481',
Lei Zhangae755aa2019-12-07 00:48:54 +000021 'code_coverage_revision': 'c7a868bacaccf4f52848e04564fb7de0671e0727',
Lei Zhangff3f4b22020-01-16 00:45:53 +000022 'depot_tools_revision': 'e9730d75a00548a22e4392567243969d85c02dd4',
Lei Zhange386b832020-01-23 19:01:04 +000023 'freetype_revision': 'e5038be70414cf66da6c4d5ce4e30375884c30d8',
Lei Zhang1a3bf0f2019-12-07 01:13:38 +000024 'gtest_revision': '5395345ca4f0c596110188688ed990e0de5a181c',
Lei Zhang205fae22020-01-15 23:57:04 +000025 'icu_revision': 'dbd3825b31041d782c5b504c59dcfb5ac7dda08c',
Lei Zhang601f4512019-12-05 22:52:58 +000026 'instrumented_lib_revision': '4dca59c6a614b08b394ed6154a8fcded9298b07e',
Lei Zhangb471c932019-10-03 18:33:25 +000027 'jinja2_revision': 'b41863e42637544c2941b574c7877d3e1f663e25',
Lei Zhangfc1099a2019-12-16 20:53:28 +000028 'jpeg_turbo_revision': 'ce0e57e8e636f5132fe6f0590a4dba91f92fd935',
Dale Curtisc758d9d2017-04-06 14:10:09 -070029 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Hui Yingst9231ac52019-07-10 20:59:39 +000030 'pdfium_tests_revision': '02dd653ec62649b6f1aa4e4526071cc32d903f54',
Lei Zhang26cd1222019-12-07 03:50:02 +000031 'skia_revision': 'd50cc95872a8a832faea0154f7ea1fd56cebc775',
Lei Zhang3658d6d2018-07-03 18:02:19 +000032 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
Lei Zhang417abf42020-01-15 23:40:24 +000033 'trace_event_revision': '81c050f857a0e3c960cfd87f37e3d30d2ef78718',
Lei Zhang8552a2a2020-01-16 01:23:25 +000034 'v8_revision': 'cd34145326def51cb6dcf87aed7d0caf9f62bb4f',
Lei Zhangebfd26c2018-07-11 22:12:59 +000035 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhang19712492020-01-15 23:44:34 +000036 'zlib_revision': '814da1f383b625955149c3845db62af3f29a4ffe',
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 Zhang8d161262019-03-21 19:06:30 +000048 Var('chromium_git') + "/chromium/src/buildtools.git@" +
Lei Zhangeb39cdb2017-03-31 12:26:15 -070049 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 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000175 # Pull clang-format binaries using checked-in hashes.
Tom Sepeze9446f82015-08-13 15:51:43 -0700176 'name': 'clang_format_win',
177 'pattern': '.',
178 'action': [ 'download_from_google_storage',
179 '--no_resume',
180 '--platform=win32',
181 '--no_auth',
182 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700183 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700184 ],
185 },
186 {
187 'name': 'clang_format_mac',
188 'pattern': '.',
189 'action': [ 'download_from_google_storage',
190 '--no_resume',
191 '--platform=darwin',
192 '--no_auth',
193 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700194 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700195 ],
196 },
197 {
198 'name': 'clang_format_linux',
199 'pattern': '.',
200 'action': [ 'download_from_google_storage',
201 '--no_resume',
202 '--platform=linux*',
203 '--no_auth',
204 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700205 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700206 ],
207 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700208 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000209 # Note: On Win, this should run after win_toolchain, as it may use it.
Oliver Changafaa98e2015-10-21 15:29:47 -0700210 'name': 'clang',
211 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700212 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700213 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700214 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700215 },
weili9a1b6652016-04-28 15:26:45 -0700216 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000217 'name': 'binutils',
218 'pattern': 'src/third_party/binutils',
219 'condition': 'host_os == "linux"',
220 'action': [
221 'python',
222 'pdfium/third_party/binutils/download.py',
223 ],
224 },
225 {
Lei Zhang728127c2018-02-16 19:26:20 +0000226 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700227 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000228 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700229 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000230 '--arch=arm'],
231 },
232 {
233 'name': 'sysroot_arm64',
234 'pattern': '.',
235 'condition': 'checkout_linux and checkout_arm64',
236 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
237 '--arch=arm64'],
238 },
239 {
240 'name': 'sysroot_x86',
241 'pattern': '.',
242 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
243 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
244 '--arch=x86'],
245 },
246 {
247 'name': 'sysroot_mips',
248 'pattern': '.',
249 'condition': 'checkout_linux and checkout_mips',
250 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
251 '--arch=mips'],
252 },
253 {
254 'name': 'sysroot_x64',
255 'pattern': '.',
256 'condition': 'checkout_linux and checkout_x64',
257 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
258 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700259 },
260 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000261 'name': 'msan_chained_origins',
262 'pattern': '.',
263 'condition': 'checkout_instrumented_libraries',
264 'action': [ 'python',
265 'pdfium/third_party/depot_tools/download_from_google_storage.py',
266 "--no_resume",
267 "--no_auth",
268 "--bucket", "chromium-instrumented-libraries",
269 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
270 ],
271 },
272 {
273 'name': 'msan_no_origins',
274 'pattern': '.',
275 'condition': 'checkout_instrumented_libraries',
276 'action': [ 'python',
277 'pdfium/third_party/depot_tools/download_from_google_storage.py',
278 "--no_resume",
279 "--no_auth",
280 "--bucket", "chromium-instrumented-libraries",
281 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
282 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700283 },
Lei Zhangd3220622018-08-27 17:43:10 +0000284 {
285 # Update LASTCHANGE.
286 'name': 'lastchange',
287 'pattern': '.',
288 'action': ['python', 'pdfium/build/util/lastchange.py',
289 '-o', 'pdfium/build/util/LASTCHANGE'],
290 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700291]