blob: 32ae5ed5df6584eed026ca88a00d97a8e82c8d26 [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
dsinclair11988d72016-05-04 10:17:00 -07007 'build_revision': 'c557a3544d31513394681f40c8c2512cf7ddcb9e',
8 'buildtools_revision': '309289315767f615256eada4653b4917cf148c8e',
dsinclair76c53792016-04-26 11:05:26 -07009 'clang_revision': 'b6f620b311665e2d96d0921833f54295b9bbf925',
Dan Sinclaira03c3432016-03-16 15:35:20 -040010 'cygwin_revision': 'c89e446b273697fadf3a10ff1007a97c0b7de6df',
dsinclair11988d72016-05-04 10:17:00 -070011 'gen_library_loader_revision': '916d4acd8b2cde67a390737dfba90b3c37de23a1',
Dan Sinclaira03c3432016-03-16 15:35:20 -040012 'gmock_revision': '29763965ab52f24565299976b936d1265cb6a271',
13 'gtest_revision': '8245545b6dc9c4703e6496d1efd19e975ad2b038',
thestigf1accf62016-04-12 16:54:56 -070014 'icu_revision': 'c291cde264469b20ca969ce8832088acb21e0c48',
tsepezd7725bb2016-05-04 16:20:35 -070015 'pdfium_tests_revision': '6c769320872e6ca82da4adaec1a497237f71b543',
dsinclair11988d72016-05-04 10:17:00 -070016 'skia_revision': '6f47dbaff54a7705ef3e98f1f65c765e56fd9bd0',
Dan Sinclaira03c3432016-03-16 15:35:20 -040017 'trace_event_revision': 'd83d44b13d07c2fd0a40101a7deef9b93b841732',
dsinclair76c53792016-04-26 11:05:26 -070018 'v8_revision': '5cd0d8f27e3f740179a8a3de7b9d2c0cfae7afb9',
Dan Sinclaira03c3432016-03-16 15:35:20 -040019}
20
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070021deps = {
dsinclair685bb882016-04-20 07:32:39 -070022 "build":
23 Var('chromium_git') + "/chromium/src/build.git@" + Var('build_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070024
Tom Sepez4c0e2752015-06-05 13:46:08 -070025 "buildtools":
Dan Sinclaira03c3432016-03-16 15:35:20 -040026 Var('chromium_git') + "/chromium/buildtools.git@" + Var('buildtools_revision'),
Tom Sepez4c0e2752015-06-05 13:46:08 -070027
Tom Sepez9519ab22015-03-16 15:27:19 -070028 "testing/corpus":
Dan Sinclaira03c3432016-03-16 15:35:20 -040029 Var('pdfium_git') + "/pdfium_tests@" + Var('pdfium_tests_revision'),
Tom Sepez9519ab22015-03-16 15:27:19 -070030
Tom Sepeza310e002015-02-27 13:03:07 -080031 "testing/gmock":
Dan Sinclaira03c3432016-03-16 15:35:20 -040032 Var('chromium_git') + "/external/googlemock.git@" + Var('gmock_revision'),
Tom Sepeza310e002015-02-27 13:03:07 -080033
Tom Sepez22ee2482015-01-07 10:04:16 -080034 "testing/gtest":
Dan Sinclaira03c3432016-03-16 15:35:20 -040035 Var('chromium_git') + "/external/googletest.git@" + Var('gtest_revision'),
36
dsinclair685bb882016-04-20 07:32:39 -070037 "third_party/icu":
38 Var('chromium_git') + "/chromium/deps/icu.git@" + Var('icu_revision'),
39
Dan Sinclaira03c3432016-03-16 15:35:20 -040040 "third_party/skia":
41 Var('chromium_git') + '/skia.git' + '@' + Var('skia_revision'),
Tom Sepez22ee2482015-01-07 10:04:16 -080042
Oliver Changafaa98e2015-10-21 15:29:47 -070043 "tools/clang":
weilib34d72b2016-04-18 12:24:36 -070044 Var('chromium_git') + "/chromium/src/tools/clang@" + Var('clang_revision'),
Oliver Changafaa98e2015-10-21 15:29:47 -070045
dsinclair11988d72016-05-04 10:17:00 -070046 "tools/generate_library_loader":
47 Var('chromium_git') + "/chromium/src/tools/generate_library_loader@" +
48 Var('gen_library_loader_revision'),
49
dsinclair685bb882016-04-20 07:32:39 -070050 "tools/gyp":
51 Var('chromium_git') + "/external/gyp",
52
John Abd-El-Malekfe453722014-10-16 15:32:26 -070053 "v8":
Dan Sinclaira03c3432016-03-16 15:35:20 -040054 Var('chromium_git') + "/v8/v8.git@" + Var('v8_revision'),
Lei Zhang0ef109f2016-01-11 12:24:16 -080055
56 "v8/base/trace_event/common":
Dan Sinclaira03c3432016-03-16 15:35:20 -040057 Var('chromium_git') + "/chromium/src/base/trace_event/common.git@" + Var('trace_event_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070058}
59
60deps_os = {
61 "win": {
John Abd-El-Malekfe453722014-10-16 15:32:26 -070062 "v8/third_party/cygwin":
Dan Sinclaira03c3432016-03-16 15:35:20 -040063 Var('chromium_git') + "/chromium/deps/cygwin@" + Var('cygwin_revision'),
Aneesh Mulye2ee9c3a2014-08-06 18:11:02 -070064 },
65}
Tom Sepez4c0e2752015-06-05 13:46:08 -070066
67include_rules = [
Lei Zhang8fec3e42015-11-04 15:32:02 -080068 # Basic stuff that everyone can use.
69 # Note: public is not here because core cannot depend on public.
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070070 '+testing',
71 '+third_party/base',
Tom Sepez4c0e2752015-06-05 13:46:08 -070072]
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070073
weili90c964f2016-04-22 15:25:14 -070074specific_include_rules = {
75 # Allow embedder tests to use public APIs.
76 "(.*embeddertest\.cpp)": [
77 "+public",
78 ]
79}
80
Tom Sepez0c1bd7c2015-06-17 15:56:43 -070081hooks = [
dsinclair685bb882016-04-20 07:32:39 -070082 # Pull GN binaries. This needs to be before running GYP below.
83 {
dsinclairb4e87082016-04-20 12:18:16 -070084 'name': 'gn_win',
dsinclair685bb882016-04-20 07:32:39 -070085 'action': [ 'download_from_google_storage',
86 '--no_resume',
87 '--platform=win32',
88 '--no_auth',
89 '--bucket', 'chromium-gn',
90 '-s', 'pdfium/buildtools/win/gn.exe.sha1',
91 ],
92 },
93 {
94 'name': 'gn_mac',
95 'pattern': '.',
96 'action': [ 'download_from_google_storage',
97 '--no_resume',
98 '--platform=darwin',
99 '--no_auth',
100 '--bucket', 'chromium-gn',
101 '-s', 'pdfium/buildtools/mac/gn.sha1',
102 ],
103 },
104 {
105 'name': 'gn_linux64',
106 'pattern': '.',
107 'action': [ 'download_from_google_storage',
108 '--no_resume',
109 '--platform=linux*',
110 '--no_auth',
111 '--bucket', 'chromium-gn',
112 '-s', 'pdfium/buildtools/linux64/gn.sha1',
113 ],
114 },
115 {
116 # Downloads the current stable linux sysroot to build/linux/ if needed.
117 # This sysroot updates at about the same rate that the chrome build deps
118 # change. This script is a no-op except for linux users who are doing
119 # official chrome builds or cross compiling.
120 'name': 'sysroot',
121 'pattern': '.',
122 'action': ['python',
123 'pdfium/build/linux/sysroot_scripts/install-sysroot.py',
124 '--running-as-hook'
125 ],
126 },
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700127 {
128 # A change to a .gyp, .gypi, or to GYP itself should run the generator.
129 'name': 'gyp',
130 'pattern': '.',
dsinclairc37b04e2016-04-19 11:04:01 -0700131 'action': ['python', 'pdfium/build_gyp/gyp_pdfium'],
Tom Sepez0c1bd7c2015-06-17 15:56:43 -0700132 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700133 # Pull clang-format binaries using checked-in hashes.
134 {
135 'name': 'clang_format_win',
136 'pattern': '.',
137 'action': [ 'download_from_google_storage',
138 '--no_resume',
139 '--platform=win32',
140 '--no_auth',
141 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700142 '-s', 'pdfium/buildtools/win/clang-format.exe.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700143 ],
144 },
145 {
146 'name': 'clang_format_mac',
147 'pattern': '.',
148 'action': [ 'download_from_google_storage',
149 '--no_resume',
150 '--platform=darwin',
151 '--no_auth',
152 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700153 '-s', 'pdfium/buildtools/mac/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700154 ],
155 },
156 {
157 'name': 'clang_format_linux',
158 'pattern': '.',
159 'action': [ 'download_from_google_storage',
160 '--no_resume',
161 '--platform=linux*',
162 '--no_auth',
163 '--bucket', 'chromium-clang-format',
Oliver Chang5a21e142015-10-21 15:19:20 -0700164 '-s', 'pdfium/buildtools/linux64/clang-format.sha1',
Tom Sepeze9446f82015-08-13 15:51:43 -0700165 ],
166 },
Oliver Changafaa98e2015-10-21 15:29:47 -0700167 {
168 # Pull clang if needed or requested via GYP_DEFINES.
169 'name': 'clang',
170 'pattern': '.',
dsinclair685bb882016-04-20 07:32:39 -0700171 'action': ['python',
172 'pdfium/tools/clang/scripts/update.py',
173 '--if-needed'
174 ],
Oliver Changafaa98e2015-10-21 15:29:47 -0700175 },
weili9a1b6652016-04-28 15:26:45 -0700176 {
177 # Update the Windows toolchain if necessary.
178 'name': 'win_toolchain',
179 'pattern': '.',
weili5593bb82016-04-29 20:14:55 -0700180 'action': ['python', 'pdfium/build/vs_toolchain.py', 'update'],
weili9a1b6652016-04-28 15:26:45 -0700181 },
Tom Sepeze9446f82015-08-13 15:51:43 -0700182]