blob: 10b5a2912d8fa1361932f26b8b14ad7a29d04072 [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 Zhangf4f8cc52018-12-11 01:37:45 +000017 'binutils_revision': '2be73f7fbf783d7a0b288e174a5773b67c7656bc',
Lei Zhangfe50df42018-12-23 04:49:27 +000018 'build_revision': '3930eef4949dc294ea50378c9a92f9ad61a05c5e',
Lei Zhang4b581482018-12-23 04:46:26 +000019 'buildtools_revision': '0e1cbc4eab6861b0c84bf2ed9a3c4b7aa2063819',
Lei Zhang7e0b3912018-12-23 06:53:37 +000020 'catapult_revision': '7c1d51b169edfb62a3e2f88730f1182240cfe981',
Lei Zhang25b22222018-12-23 04:47:26 +000021 'clang_revision': '2cf76f56cb0f9cb84105f00bbc742416729b905d',
Lei Zhanga09bfbf2018-12-23 03:59:30 +000022 'code_coverage_revision': '16298755a926f419babc4a11ccfeae0035f48c3f',
Dan Sinclaira03c3432016-03-16 15:35:20 -040023 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Lei Zhang1d77a1b2018-11-10 07:18:52 +000024 'depot_tools_revision': 'ddbeac1c06a9c0ffa100f6f2af672af83f980fcb',
Ben Wagnerf1038802018-12-06 19:43:27 +000025 'freetype_revision': 'd01e28f41f8810c8ea422b854f8722659589fa99',
Lei Zhangbed82822018-12-23 04:44:56 +000026 'gtest_revision': '879ac092fde0a19e1b3a61b2546b2a422b1528bc',
Lei Zhang5f45d7d2018-12-23 04:07:51 +000027 'icu_revision': '23de01679d298bf9fb964ebede32f2157729ba96',
Lei Zhang5b35e382018-11-10 07:20:21 +000028 'instrumented_lib_revision': 'a959e4f0cb643003f2d75d179cede449979e3e77',
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 Zhang042036d2018-11-10 05:55:54 +000033 'skia_revision': '36b85be4944363139562664c964d6fde749babdb',
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 Zhang0eccd2b2018-12-23 05:34:00 +000036 'v8_revision': 'ec2203e1fce49480868df0f85b395963be461d13',
Lei Zhangebfd26c2018-07-11 22:12:59 +000037 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
Lei Zhangd9f78622018-12-23 03:58:30 +000038 'zlib_revision': '2aafd9d335e4fd6fa0c74892252280a1bb51ce6f',
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 Zhangd64fa442018-12-23 06:52:57 +0000123 Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
jbudorick7f3a15f2016-06-10 06:28:40 -0700124 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700125 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700126 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400127 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700128 },
129}
Tom Sepez4c0e2752015-06-05 13:46:08 -0700130
thestig3873f302016-09-28 17:39:26 -0700131recursedeps = [
132 # buildtools provides clang_format, libc++, and libc++abi
133 'buildtools',
134]
135
Tom Sepez4c0e2752015-06-05 13:46:08 -0700136include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800137 # Basic stuff that everyone can use.
138 # Note: public is not here because core cannot depend on public.
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 {
dsinclairb4e87082016-04-20 12:18:16 -0700153 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700154 'action': [ 'download_from_google_storage',
155 '--no_resume',
156 '--platform=win32',
157 '--no_auth',
158 '--bucket', 'chromium-gn',
159 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
160 ],
161 },
162 {
163 'name': 'gn_mac',
164 'pattern': '.',
165 'action': [ 'download_from_google_storage',
166 '--no_resume',
167 '--platform=darwin',
168 '--no_auth',
169 '--bucket', 'chromium-gn',
170 '-s', 'pdfium/buildtools/mac/gn.sha1',
171 ],
172 },
173 {
174 'name': 'gn_linux64',
175 'pattern': '.',
176 'action': [ 'download_from_google_storage',
177 '--no_resume',
178 '--platform=linux*',
179 '--no_auth',
180 '--bucket', 'chromium-gn',
181 '-s', 'pdfium/buildtools/linux64/gn.sha1',
182 ],
183 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700184 # Pull clang-format binaries using checked-in hashes.
185 {
186 'name': 'clang_format_win',
187 'pattern': '.',
188 'action': [ 'download_from_google_storage',
189 '--no_resume',
190 '--platform=win32',
191 '--no_auth',
192 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700193 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700194 ],
195 },
196 {
197 'name': 'clang_format_mac',
198 'pattern': '.',
199 'action': [ 'download_from_google_storage',
200 '--no_resume',
201 '--platform=darwin',
202 '--no_auth',
203 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700204 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700205 ],
206 },
207 {
208 'name': 'clang_format_linux',
209 'pattern': '.',
210 'action': [ 'download_from_google_storage',
211 '--no_resume',
212 '--platform=linux*',
213 '--no_auth',
214 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700215 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700216 ],
217 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700218 {
dsinclairb12fbdde2016-09-19 10:45:14 -0700219 # Pull clang
Oliver Changafaa98e2015-10-21 15:29:47 -0700220 'name': 'clang',
221 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700222 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700223 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700224 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700225 },
weili9a1b6652016-04-28 15:26:45 -0700226 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000227 'name': 'binutils',
228 'pattern': 'src/third_party/binutils',
229 'condition': 'host_os == "linux"',
230 'action': [
231 'python',
232 'pdfium/third_party/binutils/download.py',
233 ],
234 },
235 {
Lei Zhang728127c2018-02-16 19:26:20 +0000236 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700237 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000238 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700239 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000240 '--arch=arm'],
241 },
242 {
243 'name': 'sysroot_arm64',
244 'pattern': '.',
245 'condition': 'checkout_linux and checkout_arm64',
246 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
247 '--arch=arm64'],
248 },
249 {
250 'name': 'sysroot_x86',
251 'pattern': '.',
252 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
253 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
254 '--arch=x86'],
255 },
256 {
257 'name': 'sysroot_mips',
258 'pattern': '.',
259 'condition': 'checkout_linux and checkout_mips',
260 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
261 '--arch=mips'],
262 },
263 {
264 'name': 'sysroot_x64',
265 'pattern': '.',
266 'condition': 'checkout_linux and checkout_x64',
267 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
268 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700269 },
270 {
Lei Zhang451c9b42018-02-21 10:35:20 +0000271 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
272 'name': 'ciopfs_linux',
273 'pattern': '.',
274 'condition': 'checkout_win and host_os == "linux"',
275 'action': [ 'python',
276 'pdfium/third_party/depot_tools/download_from_google_storage.py',
277 '--no_resume',
278 '--no_auth',
279 '--bucket', 'chromium-browser-clang/ciopfs',
280 '-s', 'pdfium/build/ciopfs.sha1',
281 ]
282 },
283 {
weili9a1b6652016-04-28 15:26:45 -0700284 # Update the Windows toolchain if necessary.
285 'name': 'win_toolchain',
286 'pattern': '.',
Lei Zhang63579f92017-12-21 19:18:00 -0800287 'condition': 'checkout_win',
Lei Zhang451c9b42018-02-21 10:35:20 +0000288 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
weili9a1b6652016-04-28 15:26:45 -0700289 },
weili62f36732016-10-14 16:59:40 -0700290 {
weili9053f192016-11-18 14:03:49 -0800291 # Update the Mac toolchain if necessary.
292 'name': 'mac_toolchain',
293 'pattern': '.',
294 'action': ['python', 'pdfium/build/mac_toolchain.py'],
295 },
Tom Anderson4e8edf52017-03-30 18:27:21 -0700296 {
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]