blob: a93928220815ab51f5fac1f3c5b4fc1aa272298e [file] [log] [blame]
Svet Ganove6986e12015-06-04 14:52:15 -07001use_relative_paths = True
2
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -07003vars = {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -07004 # 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
Haibo Huang49cc9302020-04-27 16:14:24 -070010 'checkout_instrumented_libraries': 'checkout_linux and checkout_configuration != "small"',
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070011
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070012 'chromium_git': 'https://chromium.googlesource.com',
13 'pdfium_git': 'https://pdfium.googlesource.com',
14
Haibo Huang49cc9302020-04-27 16:14:24 -070015 'android_ndk_revision': '27c0a8d090c666a50e40fceb4ee5b40b1a2d3f87',
16 'binutils_revision': '01aa7745b0bab64ae22600f09fd6483c60f22ebf',
17 'build_revision': '1bee638a8c4a9481ea06df4982d69488d0a5626d',
18 'buildtools_revision': '1f38b432e5630619f3aba0a22b9b63d606aee35a',
19 'catapult_revision': 'f7d73bb520283d2a06b8fde8a1b02aa33414fcd0',
20 'clang_revision': '42fbdfef1ce265b09dc6bda2ed90d83324c97481',
21 'code_coverage_revision': 'c7a868bacaccf4f52848e04564fb7de0671e0727',
22 'depot_tools_revision': 'e9730d75a00548a22e4392567243969d85c02dd4',
23 'freetype_revision': 'e5038be70414cf66da6c4d5ce4e30375884c30d8',
24 'gtest_revision': '5395345ca4f0c596110188688ed990e0de5a181c',
25 'icu_revision': 'dbd3825b31041d782c5b504c59dcfb5ac7dda08c',
26 'instrumented_lib_revision': '4dca59c6a614b08b394ed6154a8fcded9298b07e',
27 'jinja2_revision': 'b41863e42637544c2941b574c7877d3e1f663e25',
28 'jpeg_turbo_revision': 'ce0e57e8e636f5132fe6f0590a4dba91f92fd935',
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070029 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Haibo Huang49cc9302020-04-27 16:14:24 -070030 'pdfium_tests_revision': '02dd653ec62649b6f1aa4e4526071cc32d903f54',
31 'skia_revision': 'd50cc95872a8a832faea0154f7ea1fd56cebc775',
32 'tools_memory_revision': 'f7b00daf4df7f6c469f5fbc68d7f40f6bd15d6e6',
33 'trace_event_revision': '81c050f857a0e3c960cfd87f37e3d30d2ef78718',
34 'v8_revision': 'cd34145326def51cb6dcf87aed7d0caf9f62bb4f',
35 'yasm_source_revision': '720b70524a4424b15fc57e82263568c8ba0496ad',
36 'zlib_revision': '814da1f383b625955149c3845db62af3f29a4ffe',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070037}
38
Svet Ganove6986e12015-06-04 14:52:15 -070039deps = {
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070040 "base/trace_event/common":
41 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
42 Var('trace_event_revision'),
43
44 "build":
45 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Svet Ganove6986e12015-06-04 14:52:15 -070046
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080047 "buildtools":
Haibo Huang49cc9302020-04-27 16:14:24 -070048 Var('chromium_git') + "/chromium/src/buildtools.git@" +
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070049 Var('buildtools_revision'),
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -080050
Svet Ganove6986e12015-06-04 14:52:15 -070051 "testing/corpus":
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070052 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Svet Ganove6986e12015-06-04 14:52:15 -070053
Haibo Huang49cc9302020-04-27 16:14:24 -070054 "third_party/android_ndk": {
55 'url': Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
56 'condition': 'checkout_android',
57 },
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070058
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070059 "third_party/binutils":
60 Var('chromium_git') + "/chromium/src/third_party/binutils.git@" +
61 Var('binutils_revision'),
62
Haibo Huang49cc9302020-04-27 16:14:24 -070063 "third_party/catapult": {
64 'url': Var('chromium_git') + '/catapult.git' + '@' + Var('catapult_revision'),
65 'condition': 'checkout_android',
66 },
67
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070068 'third_party/depot_tools':
69 Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' +
70 Var('depot_tools_revision'),
71
72 "third_party/freetype/src":
73 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
74 Var('freetype_revision'),
75
Haibo Huang49cc9302020-04-27 16:14:24 -070076 "third_party/googletest/src":
77 Var('chromium_git') + '/external/github.com/google/googletest.git' + '@' +
78 Var('gtest_revision'),
79
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070080 "third_party/icu":
81 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
82
83 "third_party/instrumented_libraries":
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -070084 Var('chromium_git') +
85 "/chromium/src/third_party/instrumented_libraries.git@" +
86 Var('instrumented_lib_revision'),
87
88 "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
96 "third_party/libjpeg_turbo":
97 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
98 Var('jpeg_turbo_revision'),
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -070099
100 "third_party/skia":
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700101 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
102
103 "third_party/zlib":
104 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
105 Var('zlib_revision'),
106
107 'third_party/yasm/source/patched-yasm':
108 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
109 Var('yasm_source_revision'),
Svet Ganove6986e12015-06-04 14:52:15 -0700110
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800111 "tools/clang":
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700112 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
113
Haibo Huang49cc9302020-04-27 16:14:24 -0700114 "tools/code_coverage":
115 Var('chromium_git') + "/chromium/src/tools/code_coverage.git@" +
116 Var('code_coverage_revision'),
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700117
118 "tools/memory":
119 Var('chromium_git') + "/chromium/src/tools/memory@" +
120 Var('tools_memory_revision'),
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800121
Svet Ganove6986e12015-06-04 14:52:15 -0700122 "v8":
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700123 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Svet Ganove6986e12015-06-04 14:52:15 -0700124}
125
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700126recursedeps = [
127 # buildtools provides clang_format, libc++, and libc++abi
128 'buildtools',
129]
130
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800131include_rules = [
132 # Basic stuff that everyone can use.
133 # Note: public is not here because core cannot depend on public.
Haibo Huang49cc9302020-04-27 16:14:24 -0700134 '+build/build_config.h',
135 '+constants',
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800136 '+testing',
137 '+third_party/base',
138]
139
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700140specific_include_rules = {
141 # Allow embedder tests to use public APIs.
142 "(.*embeddertest\.cpp)": [
143 "+public",
144 ]
145}
146
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800147hooks = [
148 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700149 # Case-insensitivity for the Win SDK. Must run before win_toolchain below.
150 'name': 'ciopfs_linux',
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800151 'pattern': '.',
Haibo Huang49cc9302020-04-27 16:14:24 -0700152 'condition': 'checkout_win and host_os == "linux"',
153 'action': [ 'python',
154 'pdfium/third_party/depot_tools/download_from_google_storage.py',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700155 '--no_resume',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700156 '--no_auth',
Haibo Huang49cc9302020-04-27 16:14:24 -0700157 '--bucket', 'chromium-browser-clang/ciopfs',
158 '-s', 'pdfium/build/ciopfs.sha1',
159 ]
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700160 },
161 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700162 # Update the Windows toolchain if necessary. Must run before 'clang' below.
163 'name': 'win_toolchain',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700164 'pattern': '.',
Haibo Huang49cc9302020-04-27 16:14:24 -0700165 'condition': 'checkout_win',
166 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update', '--force'],
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800167 },
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800168 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700169 # Update the Mac toolchain if necessary.
170 'name': 'mac_toolchain',
171 'pattern': '.',
172 'action': ['python', 'pdfium/build/mac_toolchain.py'],
173 },
174 {
175 # Pull clang-format binaries using checked-in hashes.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800176 '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',
183 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
184 ],
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',
194 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
195 ],
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',
205 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
206 ],
207 },
208 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700209 # Note: On Win, this should run after win_toolchain, as it may use it.
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800210 'name': 'clang',
211 'pattern': '.',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700212 'action': ['python',
213 'pdfium/tools/clang/scripts/update.py'
214 ],
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800215 },
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700216 {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700217 '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 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700226 'name': 'sysroot_arm',
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700227 'pattern': '.',
Haibo Huang49cc9302020-04-27 16:14:24 -0700228 'condition': 'checkout_linux and checkout_arm',
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700229 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
Haibo Huang49cc9302020-04-27 16:14:24 -0700230 '--arch=arm'],
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700231 },
232 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700233 'name': 'sysroot_arm64',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700234 'pattern': '.',
Haibo Huang49cc9302020-04-27 16:14:24 -0700235 'condition': 'checkout_linux and checkout_arm64',
236 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
237 '--arch=arm64'],
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700238 },
239 {
Haibo Huang49cc9302020-04-27 16:14:24 -0700240 'name': 'sysroot_x86',
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700241 'pattern': '.',
Haibo Huang49cc9302020-04-27 16:14:24 -0700242 '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'],
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700259 },
260 {
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700261 '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 ],
Philip P. Moltmann4d3acf42017-03-20 11:05:52 -0700271 },
Philip P. Moltmannd904c1e2018-03-19 09:26:45 -0700272 {
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 ],
283 },
Haibo Huang49cc9302020-04-27 16:14:24 -0700284 {
285 # Update LASTCHANGE.
286 'name': 'lastchange',
287 'pattern': '.',
288 'action': ['python', 'pdfium/build/util/lastchange.py',
289 '-o', 'pdfium/build/util/LASTCHANGE'],
290 },
Philip P. Moltmannac3d58c2016-03-04 15:19:21 -0800291]