blob: 78869ff04a1da1cbdd5743e6ac180d7aa9b0845e [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
jbudorick7f3a15f2016-06-10 06:28:40 -07007 'android_ndk_revision': '5022f40f12953c02b2614c5f7beb981ec5d0e833',
thestig253186c2016-07-01 19:11:30 -07008 'build_revision': '76d9f8b4fcae07fb82f28295468cf92bade935bd',
jochen9e077d22016-06-09 02:51:13 -07009 'buildtools_revision': '099f1da55bfe8caa12266371a7eb983698fb1d87',
jbudorick7f3a15f2016-06-10 06:28:40 -070010 'catapult_revision': '8ff23141e1df724317e9f558644ce2a7d8afde54',
thestig9747b172016-07-01 18:01:47 -070011 'clang_revision': '775e2f874b9f53f0e82c4e7c61dc29f3cdcb3379',
Dan Sinclaira03c3432016-03-16 15:35:20 -040012 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
dsinclair11988d72016-05-04 10:17:00 -070013 'gen_library_loader_revision': '916d4acd8b2cde67a390737dfba90b3c37de23a1',
Dan Sinclaira03c3432016-03-16 15:35:20 -040014 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271',
15 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
thestigf1accf62016-04-12 16:54:56 -070016 'icu_revision': 'c291cde264469b20ca969ce8832088acb21e0c48',
tsepezd7725bb2016-05-04 16:20:35 -070017 'pdfium_tests_revision': '6c769320872e6ca82da4adaec1a497237f71b543',
caryclarkbc85eec2016-06-08 12:58:40 -070018 'skia_revision': '7942f22c607caf826a6a609b89338a569d0a30e7',
dsinclairfb969002016-05-31 12:55:32 -070019 'tools_memory_revision': '427f10475e1a8d72424c29d00bf689122b738e5d',
jochen9e077d22016-06-09 02:51:13 -070020 'trace_event_revision': '54b8455be9505c2cb0cf5c26bb86739c236471aa',
21 'v8_revision': 'cec0ed0f77e91bfd49bbd298ab58f77375eecead',
Dan Sinclaira03c3432016-03-16 15:35:20 -040022}
23
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070024deps = {
dsinclair685bb882016-04-20 07:32:39 -070025 "build":
26 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070027
Tom Sepez4c0e2752015-06-05 13:46:08 -070028 "buildtools":
Dan Sinclaira03c3432016-03-16 15:35:20 -040029 Var('chromium_git') + "/chromium/buildtools.git@" + Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070030
Tom Sepez9519ab22015-03-16 15:27:19 -070031 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040032 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070033
Tom Sepeza310e002015-02-27 13:03:07 -080034 "testing/gmock":
Dan Sinclaira03c3432016-03-16 15:35:20 -040035 Var('chromium_git') + "/external/googlemock.git@" + Var('gmock_revision'),
Tom Sepeza310e002015-02-27 13:03:07 -080036
Tom Sepez22ee2482015-01-07 10:04:16 -080037 "testing/gtest":
Dan Sinclaira03c3432016-03-16 15:35:20 -040038 Var('chromium_git') + "/external/googletest.git@" + Var('gtest_revision'),
39
dsinclair685bb882016-04-20 07:32:39 -070040 "third_party/icu":
41 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
42
Dan Sinclaira03c3432016-03-16 15:35:20 -040043 "third_party/skia":
44 Var('chromium_git') + '/skia.git' + '@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080045
Oliver Changafaa98e2015-10-21 15:29:47 -070046 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -070047 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -070048
dsinclair11988d72016-05-04 10:17:00 -070049 "tools/generate_library_loader":
50 Var('chromium_git') + "/chromium/src/tools/generate_library_loader@" +
51 Var('gen_library_loader_revision'),
52
dsinclair685bb882016-04-20 07:32:39 -070053 "tools/gyp":
54 Var('chromium_git') + "/external/gyp",
55
dsinclairfb969002016-05-31 12:55:32 -070056 "tools/memory":
57 Var('chromium_git') + "/chromium/src/tools/memory@" +
58 Var('tools_memory_revision'),
59
John Abd-El-Malekfe453722014-10-16 15:32:26 -070060 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -040061 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Lei Zhang0ef109f2016-01-11 12:24:16 -080062
63 "v8/base/trace_event/common":
dsinclairfb969002016-05-31 12:55:32 -070064 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" +
65 Var('trace_event_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070066}
67
68deps_os = {
jbudorick7f3a15f2016-06-10 06:28:40 -070069 "android": {
70 "third_party/android_ndk":
71 Var('chromium_git') + "/android_ndk.git@" + Var('android_ndk_revision'),
72 "third_party/catapult":
73 Var('chromium_git') + "/external/github.com/catapult-project/catapult.git@" + Var('catapult_revision'),
74 },
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070075 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -070076 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -040077 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070078 },
79}
Tom Sepez4c0e2752015-06-05 13:46:08 -070080
81include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -080082 # Basic stuff that everyone can use.
83 # Note: public is not here because core cannot depend on public.
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070084 '+testing',
85 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -070086]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070087
weili90c964f2016-04-22 15:25:14 -070088specific_include_rules = {
89 # Allow embedder tests to use public APIs.
90 "(.*embeddertest\.cpp)": [
91 "+public",
92 ]
93}
94
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070095hooks = [
dsinclair685bb882016-04-20 07:32:39 -070096 # Pull GN binaries. This needs to be before running GYP below.
97 {
dsinclairb4e87082016-04-20 12:18:16 -070098 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -070099 'action': [ 'download_from_google_storage',
100 '--no_resume',
101 '--platform=win32',
102 '--no_auth',
103 '--bucket', 'chromium-gn',
104 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
105 ],
106 },
107 {
108 'name': 'gn_mac',
109 'pattern': '.',
110 'action': [ 'download_from_google_storage',
111 '--no_resume',
112 '--platform=darwin',
113 '--no_auth',
114 '--bucket', 'chromium-gn',
115 '-s', 'pdfium/buildtools/mac/gn.sha1',
116 ],
117 },
118 {
119 'name': 'gn_linux64',
120 'pattern': '.',
121 'action': [ 'download_from_google_storage',
122 '--no_resume',
123 '--platform=linux*',
124 '--no_auth',
125 '--bucket', 'chromium-gn',
126 '-s', 'pdfium/buildtools/linux64/gn.sha1',
127 ],
128 },
129 {
130 # Downloads the current stable linux sysroot to build/linux/ if needed.
131 # This sysroot updates at about the same rate that the chrome build deps
132 # change. This script is a no-op except for linux users who are doing
133 # official chrome builds or cross compiling.
134 'name': 'sysroot',
135 'pattern': '.',
136 'action': ['python',
137 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
138 '--running-as-hook'
139 ],
140 },
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700141 {
142 # A change to a .gyp, .gypi, or to GYP itself should run the generator.
143 'name': 'gyp',
144 'pattern': '.',
dsinclairc37b04e2016-04-19 11:04:01 -0700145 'action': ['python', 'pdfium/build_gyp/gyp_pdfium'],
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700146 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700147 # Pull clang-format binaries using checked-in hashes.
148 {
149 'name': 'clang_format_win',
150 'pattern': '.',
151 'action': [ 'download_from_google_storage',
152 '--no_resume',
153 '--platform=win32',
154 '--no_auth',
155 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700156 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700157 ],
158 },
159 {
160 'name': 'clang_format_mac',
161 'pattern': '.',
162 'action': [ 'download_from_google_storage',
163 '--no_resume',
164 '--platform=darwin',
165 '--no_auth',
166 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700167 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700168 ],
169 },
170 {
171 'name': 'clang_format_linux',
172 'pattern': '.',
173 'action': [ 'download_from_google_storage',
174 '--no_resume',
175 '--platform=linux*',
176 '--no_auth',
177 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700178 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700179 ],
180 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700181 {
182 # Pull clang if needed or requested via GYP_DEFINES.
183 'name': 'clang',
184 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700185 'action': ['python',
186 'pdfium/tools/clang/scripts/update.py',
187 '--if-needed'
188 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700189 },
weili9a1b6652016-04-28 15:26:45 -0700190 {
191 # Update the Windows toolchain if necessary.
192 'name': 'win_toolchain',
193 'pattern': '.',
weili5593bb82016-04-29 20:14:55 -0700194 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update'],
weili9a1b6652016-04-28 15:26:45 -0700195 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700196]