blob: d3f96d8dc32de5b61a48a2ce48c2b41a0d8aa874 [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 Zhangdfc08432017-12-21 07:37:15 +000054 "third_party/binutils":
55 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
56 Var('binutils_revision'),
57
Lei Zhangab384ed2017-12-21 08:00:44 +000058 'third_party/depot_tools':
59 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
60 Var('depot_tools_revision'),
61
Lei Zhangeb39cdb2017-03-31 12:26:15 -070062 "third_party/freetype/src":
63 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
64 Var('freetype_revision'),
65
Lei Zhangc5514272018-03-22 05:19:14 +000066 "third_party/googletest/src":
67 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
68 Var('gtest_revision'),
69
dsinclair685bb882016-04-20 07:32:39 -070070 "third_party/icu":
71 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
72
weili62f36732016-10-14 16:59:40 -070073 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070074 Var('chromium_git') +
75 "/chromium/src/third_party/instrumented_libraries.git@" +
76 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -070077
Dale Curtisc758d9d2017-04-06 14:10:09 -070078 "third_party/jinja2":
79 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
80 Var('jinja2_revision'),
81
82 "third_party/markupsafe":
83 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
84 Var('markupsafe_revision'),
85
Lei Zhang0e5d8922017-04-06 21:43:50 -070086 "third_party/libjpeg_turbo":
87 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
88 Var('jpeg_turbo_revision'),
89
Dan Sinclaira03c3432016-03-16 15:35:20 -040090 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070091 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080092
Lei Zhanga2af7de2017-03-31 13:33:12 -070093 "third_party/zlib":
94 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
95 Var('zlib_revision'),
96
Lei Zhang0e5d8922017-04-06 21:43:50 -070097 'third_party/yasm/source/patched-yasm':
98 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
99 Var('yasm_source_revision'),
100
Oliver Changafaa98e2015-10-21 15:29:47 -0700101 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -0700102 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -0700103
Ryan Harrisona7b65b82018-05-30 19:56:11 +0000104 "tools/code_coverage":
105 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
106 Var('code_coverage_revision'),
107
dsinclairfb969002016-05-31 12:55:32 -0700108 "tools/memory":
109 Var('chromium_git') + "/chromium/src/tools/memory@" +
110 Var('tools_memory_revision'),
111
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700112 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400113 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700114}
115
116deps_os = {
jbudorick7f3a15f2016-06-10 06:28:40 -0700117 "android": {
118 "third_party/android_ndk":
119 Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
120 "third_party/catapult":
Lei Zhangd64fa442018-12-23 06:52:57 +0000121 Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
jbudorick7f3a15f2016-06-10 06:28:40 -0700122 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700123}
Tom Sepez4c0e2752015-06-05 13:46:08 -0700124
thestig3873f302016-09-28 17:39:26 -0700125recursedeps = [
126 # buildtools provides clang_format, libc++, and libc++abi
127 'buildtools',
128]
129
Tom Sepez4c0e2752015-06-05 13:46:08 -0700130include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800131 # Basic stuff that everyone can use.
132 # Note: public is not here because core cannot depend on public.
Lei Zhangf79e15b2019-03-19 23:15:50 +0000133 '+build/build_config.h',
Lei Zhang26170562018-04-17 17:01:52 +0000134 '+constants',
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700135 '+testing',
136 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700137]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700138
weili90c964f2016-04-22 15:25:14 -0700139specific_include_rules = {
140 # Allow embedder tests to use public APIs.
141 "(.*embeddertest\.cpp)": [
142 "+public",
143 ]
144}
145
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700146hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700147 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000148 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
149 'name': 'ciopfs_linux',
150 'pattern': '.',
151 'condition': 'checkout_win and host_os == "linux"',
152 'action': [ 'python',
153 'pdfium/third_party/depot_tools/download_from_google_storage.py',
154 '--no_resume',
155 '--no_auth',
156 '--bucket', 'chromium-browser-clang/ciopfs',
157 '-s', 'pdfium/build/ciopfs.sha1',
158 ]
159 },
160 {
161 # Update the Windows toolchain if necessary. Must run before 'clang' below.
162 'name': 'win_toolchain',
163 'pattern': '.',
164 'condition': 'checkout_win',
165 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
166 },
167 {
168 # Update the Mac toolchain if necessary.
169 'name': 'mac_toolchain',
170 'pattern': '.',
171 'action': ['python', 'pdfium/build/mac_toolchain.py'],
172 },
173 {
dsinclairb4e87082016-04-20 12:18:16 -0700174 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700175 'action': [ 'download_from_google_storage',
176 '--no_resume',
177 '--platform=win32',
178 '--no_auth',
179 '--bucket', 'chromium-gn',
180 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
181 ],
182 },
183 {
184 'name': 'gn_mac',
185 'pattern': '.',
186 'action': [ 'download_from_google_storage',
187 '--no_resume',
188 '--platform=darwin',
189 '--no_auth',
190 '--bucket', 'chromium-gn',
191 '-s', 'pdfium/buildtools/mac/gn.sha1',
192 ],
193 },
194 {
195 'name': 'gn_linux64',
196 'pattern': '.',
197 'action': [ 'download_from_google_storage',
198 '--no_resume',
199 '--platform=linux*',
200 '--no_auth',
201 '--bucket', 'chromium-gn',
202 '-s', 'pdfium/buildtools/linux64/gn.sha1',
203 ],
204 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700205 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000206 # Pull clang-format binaries using checked-in hashes.
Tom Sepeze9446f82015-08-13 15:51:43 -0700207 'name': 'clang_format_win',
208 'pattern': '.',
209 'action': [ 'download_from_google_storage',
210 '--no_resume',
211 '--platform=win32',
212 '--no_auth',
213 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700214 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700215 ],
216 },
217 {
218 'name': 'clang_format_mac',
219 'pattern': '.',
220 'action': [ 'download_from_google_storage',
221 '--no_resume',
222 '--platform=darwin',
223 '--no_auth',
224 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700225 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700226 ],
227 },
228 {
229 'name': 'clang_format_linux',
230 'pattern': '.',
231 'action': [ 'download_from_google_storage',
232 '--no_resume',
233 '--platform=linux*',
234 '--no_auth',
235 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700236 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700237 ],
238 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700239 {
Lei Zhang4b1dea82019-02-08 00:39:06 +0000240 # Note: On Win, this should run after win_toolchain, as it may use it.
Oliver Changafaa98e2015-10-21 15:29:47 -0700241 'name': 'clang',
242 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700243 'action': ['python',
dsinclairb12fbdde2016-09-19 10:45:14 -0700244 'pdfium/tools/clang/scripts/update.py'
dsinclair685bb882016-04-20 07:32:39 -0700245 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700246 },
weili9a1b6652016-04-28 15:26:45 -0700247 {
Lei Zhangdfc08432017-12-21 07:37:15 +0000248 'name': 'binutils',
249 'pattern': 'src/third_party/binutils',
250 'condition': 'host_os == "linux"',
251 'action': [
252 'python',
253 'pdfium/third_party/binutils/download.py',
254 ],
255 },
256 {
Lei Zhang728127c2018-02-16 19:26:20 +0000257 'name': 'sysroot_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700258 'pattern': '.',
Lei Zhang728127c2018-02-16 19:26:20 +0000259 'condition': 'checkout_linux and checkout_arm',
Tom Anderson19817af2017-07-18 18:00:18 -0700260 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Lei Zhang728127c2018-02-16 19:26:20 +0000261 '--arch=arm'],
262 },
263 {
264 'name': 'sysroot_arm64',
265 'pattern': '.',
266 'condition': 'checkout_linux and checkout_arm64',
267 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
268 '--arch=arm64'],
269 },
270 {
271 'name': 'sysroot_x86',
272 'pattern': '.',
273 'condition': 'checkout_linux and (checkout_x86 or checkout_x64)',
274 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
275 '--arch=x86'],
276 },
277 {
278 'name': 'sysroot_mips',
279 'pattern': '.',
280 'condition': 'checkout_linux and checkout_mips',
281 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
282 '--arch=mips'],
283 },
284 {
285 'name': 'sysroot_x64',
286 'pattern': '.',
287 'condition': 'checkout_linux and checkout_x64',
288 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
289 '--arch=x64'],
Tom Anderson19817af2017-07-18 18:00:18 -0700290 },
291 {
Lei Zhangab384ed2017-12-21 08:00:44 +0000292 'name': 'msan_chained_origins',
293 'pattern': '.',
294 'condition': 'checkout_instrumented_libraries',
295 'action': [ 'python',
296 'pdfium/third_party/depot_tools/download_from_google_storage.py',
297 "--no_resume",
298 "--no_auth",
299 "--bucket", "chromium-instrumented-libraries",
300 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-chained-origins-trusty.tgz.sha1",
301 ],
302 },
303 {
304 'name': 'msan_no_origins',
305 'pattern': '.',
306 'condition': 'checkout_instrumented_libraries',
307 'action': [ 'python',
308 'pdfium/third_party/depot_tools/download_from_google_storage.py',
309 "--no_resume",
310 "--no_auth",
311 "--bucket", "chromium-instrumented-libraries",
312 "-s", "pdfium/third_party/instrumented_libraries/binaries/msan-no-origins-trusty.tgz.sha1",
313 ],
Tom Anderson4e8edf52017-03-30 18:27:21 -0700314 },
Lei Zhangd3220622018-08-27 17:43:10 +0000315 {
316 # Update LASTCHANGE.
317 'name': 'lastchange',
318 'pattern': '.',
319 'action': ['python', 'pdfium/build/util/lastchange.py',
320 '-o', 'pdfium/build/util/LASTCHANGE'],
321 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700322]