blob: f616d28456e2c69efc832f833352c1783e8641b8 [file] [log] [blame]
Lei Zhange4bf8342015-10-21 17:11:04 -07001use_relative_paths = True
2
Dan Sinclaira03c3432016-03-16 15:35:20 -04003vars = {
4 'chromium_git': 'https://chromium.googlesource.com',
5 'pdfium_git': 'https://pdfium.googlesource.com',
6
thestig50feafc2016-11-09 23:45:50 -08007 'android_ndk_revision': '26d93ec07f3ce2ec2cdfeae1b21ee6f12ff868d8',
Lei Zhang1748c4f2017-08-17 01:47:20 -07008 'build_revision': 'bee933aa41e29016998f5fbdd05cc2ce457e28c5',
Lei Zhang19319b72017-08-17 01:31:18 -07009 'buildtools_revision': 'f90f6a5af3e8cf843395bfe6243cf606f71b5344',
jbudorick2430b302016-11-23 15:43:09 -080010 'catapult_revision': '86352b966b0245d6883e5f7df27687856978b6d7',
Lei Zhang1748c4f2017-08-17 01:47:20 -070011 'clang_revision': 'a1420b85586c1fa3eaf68808bbb095334d2d271d',
Dan Sinclaira03c3432016-03-16 15:35:20 -040012 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
Nicolas Pena964e56b2017-08-03 11:48:11 -040013 'freetype_revision': '7e50824288fac5a36c2938fdb3e1c949ea53f982',
dsinclair11988d72016-05-04 10:17:00 -070014 'gen_library_loader_revision': '916d4acd8b2cde67a390737dfba90b3c37de23a1',
Dan Sinclaira03c3432016-03-16 15:35:20 -040015 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271',
16 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
Lei Zhangaec423b2017-08-17 10:30:43 -070017 'icu_revision': '08cb956852a5ccdba7f9c941728bb833529ba3c6',
Lei Zhanga0b16ec2017-08-17 10:36:43 -070018 'instrumented_lib_revision': '644afd349826cb68204226a16c38bde13abe9c3c',
Dale Curtisc758d9d2017-04-06 14:10:09 -070019 'jinja2_revision': 'd34383206fa42d52faa10bb9931d6d538f3a57e0',
Lei Zhang0e5d8922017-04-06 21:43:50 -070020 'jpeg_turbo_revision': '7260e4d8b8e1e40b17f03fafdf1cd83296900f76',
Dale Curtisc758d9d2017-04-06 14:10:09 -070021 'markupsafe_revision': '8f45f5cfa0009d2a70589bcda0349b8cb2b72783',
Nicolas Pena0bd84722017-08-14 10:36:01 -040022 'pdfium_tests_revision': '056a182ccff4c6f21e80f70a5601706dece34d84',
Lei Zhangb5df8a52017-08-17 10:40:43 -070023 'skia_revision': 'e0e20755f6c09b71038ced2bf4a00b4c4593f504',
dsinclairfb969002016-05-31 12:55:32 -070024 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d',
thestig08959c62016-11-10 13:19:23 -080025 'trace_event_revision': '06294c8a4a6f744ef284cd63cfe54dbf61eea290',
Lei Zhang00ff0b32017-08-17 01:39:52 -070026 'v8_revision': '4931eb42e8a934941dc60d8f7dc510c08d7bc2c6',
Lei Zhange20e80a2017-08-17 12:23:40 -070027 'yasm_source_revision': 'b98114e18d8b9b84586b10d24353ab8616d4c5fc',
Nicolas Penab1a794a2017-08-11 16:14:28 -040028 'zlib_revision': '718f686437b89038ac83525f4f1b1888aadd9bfc',
Dan Sinclaira03c3432016-03-16 15:35:20 -040029}
30
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070031deps = {
thestig5fec5972016-08-30 06:39:40 -070032 "base/trace_event/common":
33 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
34 Var('trace_event_revision'),
35
dsinclair685bb882016-04-20 07:32:39 -070036 "build":
37 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070038
Tom Sepez4c0e2752015-06-05 13:46:08 -070039 "buildtools":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070040 Var('chromium_git') + "/chromium/buildtools.git@" +
41 Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070042
Tom Sepez9519ab22015-03-16 15:27:19 -070043 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040044 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070045
Tom Sepeza310e002015-02-27 13:03:07 -080046 "testing/gmock":
Dan Sinclaira03c3432016-03-16 15:35:20 -040047 Var('chromium_git') + "/external/googlemock.git@" + Var('gmock_revision'),
Tom Sepeza310e002015-02-27 13:03:07 -080048
Tom Sepez22ee2482015-01-07 10:04:16 -080049 "testing/gtest":
Dan Sinclaira03c3432016-03-16 15:35:20 -040050 Var('chromium_git') + "/external/googletest.git@" + Var('gtest_revision'),
51
Lei Zhangeb39cdb2017-03-31 12:26:15 -070052 "third_party/freetype/src":
53 Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
54 Var('freetype_revision'),
55
dsinclair685bb882016-04-20 07:32:39 -070056 "third_party/icu":
57 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
58
weili62f36732016-10-14 16:59:40 -070059 "third_party/instrumented_libraries":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070060 Var('chromium_git') +
61 "/chromium/src/third_party/instrumented_libraries.git@" +
62 Var('instrumented_lib_revision'),
weili62f36732016-10-14 16:59:40 -070063
Dale Curtisc758d9d2017-04-06 14:10:09 -070064 "third_party/jinja2":
65 Var('chromium_git') + "/chromium/src/third_party/jinja2.git@" +
66 Var('jinja2_revision'),
67
68 "third_party/markupsafe":
69 Var('chromium_git') + "/chromium/src/third_party/markupsafe.git@" +
70 Var('markupsafe_revision'),
71
Lei Zhang0e5d8922017-04-06 21:43:50 -070072 "third_party/libjpeg_turbo":
73 Var('chromium_git') + "/chromium/deps/libjpeg_turbo.git@" +
74 Var('jpeg_turbo_revision'),
75
Dan Sinclaira03c3432016-03-16 15:35:20 -040076 "third_party/skia":
Lei Zhangeb39cdb2017-03-31 12:26:15 -070077 Var('chromium_git') + '/skia.git@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080078
Lei Zhanga2af7de2017-03-31 13:33:12 -070079 "third_party/zlib":
80 Var('chromium_git') + "/chromium/src/third_party/zlib.git@" +
81 Var('zlib_revision'),
82
Lei Zhang0e5d8922017-04-06 21:43:50 -070083 'third_party/yasm/source/patched-yasm':
84 Var('chromium_git') + '/chromium/deps/yasm/patched-yasm.git@' +
85 Var('yasm_source_revision'),
86
Oliver Changafaa98e2015-10-21 15:29:47 -070087 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -070088 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -070089
dsinclair11988d72016-05-04 10:17:00 -070090 "tools/generate_library_loader":
91 Var('chromium_git') + "/chromium/src/tools/generate_library_loader@" +
92 Var('gen_library_loader_revision'),
93
Tom Anderson19817af2017-07-18 18:00:18 -070094 # TODO(GYP): Remove this when no tools rely on GYP anymore.
95 "tools/gyp":
96 Var('chromium_git') + '/external/gyp.git@' +
97 'eb296f67da078ec01f5e3a9ea9cdc6d26d680161',
98
dsinclairfb969002016-05-31 12:55:32 -070099 "tools/memory":
100 Var('chromium_git') + "/chromium/src/tools/memory@" +
101 Var('tools_memory_revision'),
102
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700103 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400104 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700105}
106
107deps_os = {
jbudorick7f3a15f2016-06-10 06:28:40 -0700108 "android": {
109 "third_party/android_ndk":
110 Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
111 "third_party/catapult":
Lei Zhangeb39cdb2017-03-31 12:26:15 -0700112 Var('chromium_git') +
113 "/external/github.com/catapult-project/catapult.git@" +
114 Var('catapult_revision'),
jbudorick7f3a15f2016-06-10 06:28:40 -0700115 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700116 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -0700117 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -0400118 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -0700119 },
120}
Tom Sepez4c0e2752015-06-05 13:46:08 -0700121
thestig3873f302016-09-28 17:39:26 -0700122recursedeps = [
123 # buildtools provides clang_format, libc++, and libc++abi
124 'buildtools',
125]
126
Tom Sepez4c0e2752015-06-05 13:46:08 -0700127include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -0800128 # Basic stuff that everyone can use.
129 # Note: public is not here because core cannot depend on public.
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700130 '+testing',
131 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -0700132]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700133
weili90c964f2016-04-22 15:25:14 -0700134specific_include_rules = {
135 # Allow embedder tests to use public APIs.
136 "(.*embeddertest\.cpp)": [
137 "+public",
138 ]
139}
140
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700141hooks = [
dsinclair685bb882016-04-20 07:32:39 -0700142 {
dsinclairb4e87082016-04-20 12:18:16 -0700143 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -0700144 'action': [ 'download_from_google_storage',
145 '--no_resume',
146 '--platform=win32',
147 '--no_auth',
148 '--bucket', 'chromium-gn',
149 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
150 ],
151 },
152 {
153 'name': 'gn_mac',
154 'pattern': '.',
155 'action': [ 'download_from_google_storage',
156 '--no_resume',
157 '--platform=darwin',
158 '--no_auth',
159 '--bucket', 'chromium-gn',
160 '-s', 'pdfium/buildtools/mac/gn.sha1',
161 ],
162 },
163 {
164 'name': 'gn_linux64',
165 'pattern': '.',
166 'action': [ 'download_from_google_storage',
167 '--no_resume',
168 '--platform=linux*',
169 '--no_auth',
170 '--bucket', 'chromium-gn',
171 '-s', 'pdfium/buildtools/linux64/gn.sha1',
172 ],
173 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700174 # Pull clang-format binaries using checked-in hashes.
175 {
176 '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 {
dsinclairb12fbdde2016-09-19 10:45:14 -0700209 # Pull clang
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 {
Tom Anderson19817af2017-07-18 18:00:18 -0700217 # Downloads the current stable linux sysroot to build/linux/ if needed.
218 # This sysroot updates at about the same rate that the chrome build deps
219 # change.
220 'name': 'sysroot',
221 'pattern': '.',
222 'action': ['python', 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
223 '--running-as-hook'],
224 },
225 {
weili9a1b6652016-04-28 15:26:45 -0700226 # Update the Windows toolchain if necessary.
227 'name': 'win_toolchain',
228 'pattern': '.',
weili5593bb82016-04-29 20:14:55 -0700229 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update'],
weili9a1b6652016-04-28 15:26:45 -0700230 },
weili62f36732016-10-14 16:59:40 -0700231 {
weili9053f192016-11-18 14:03:49 -0800232 # Update the Mac toolchain if necessary.
233 'name': 'mac_toolchain',
234 'pattern': '.',
235 'action': ['python', 'pdfium/build/mac_toolchain.py'],
236 },
Tom Anderson4e8edf52017-03-30 18:27:21 -0700237 {
238 # Pull sanitizer-instrumented third-party libraries if requested via
239 # GYP_DEFINES.
240 'name': 'instrumented_libraries',
241 'pattern': '\\.sha1',
242 'action': ['python', 'pdfium/third_party/instrumented_libraries/scripts/download_binaries.py'],
243 },
weili62f36732016-10-14 16:59:40 -0700244
Tom Sepeze9446f82015-08-13 15:51:43 -0700245]