]> git.pld-linux.org Git - packages/chromium-browser.git/blame - clean-source.sh
builds as: --without tcmalloc --without nacl
[packages/chromium-browser.git] / clean-source.sh
CommitLineData
fe547a32 1#!/bin/sh
8f5f6775 2set -xe
fe547a32 3
0593259b
ER
4export LC_ALL=C
5
fe547a32 6# import options
cd09b941
ER
7# remove everything unless it's remove has been disabled with "0"
8# "v8=0" means "do not remove v8"
fe547a32
ER
9eval "$@"
10
05d9087c 11# Strip tarball from some big directories not needed on the linux platform
f888c710 12# https://code.google.com/p/chromium/wiki/LinuxPackaging
99f39995 13# initial list from src/tools/export_tarball/export_tarball.py
063abe65 14# also removed non-linux files: find -name win -o -name mac -o name android -o name windows
9304218b 15# find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
07b01cb7 16# find -type d -name *doc*
dda6f58c 17# find -type d -name *example*
894dee72
ER
18# find -type d -name java
19# find -type d -name tools
063abe65 20# find -type d -name samples
05d9087c
ER
21# suffix with _ those that we can't remove (just yet) because of the gclient
22# hooks (see build/all.gyp) or of some unneeded deps/includes
f888c710 23remove_nonessential_dirs() {
0bb93ab2
ER
24 find -type f '(' \
25 -name 'Android.mk' -o \
26 -name '*.vcproj' -o \
27 -name '*.sln' -o \
28 -name '*.mm' -o \
29 -name '*.m' \
30 ')' | xargs rm -vf
31
cfaeb929
ER
32 find -regextype posix-extended \
33 -regex '.*_(win|cros|mac)_.*.xtb' \
34 -print -delete
35
f888c710
ER
36 local dir
37 for dir in \
18ffc809 38 android_webview \
9304218b
ER
39 ash/resources/default_100_percent/cros_ \
40 ash/resources/default_200_percent/cros_ \
dda6f58c 41 ash/shell/cocoa \
9304218b 42 ash/system/chromeos \
55dddbd9 43 base/android \
9304218b 44 base/chromeos \
e31bf7c6 45 base/ios \
3333a973 46 breakpad/src/client/mac \
9304218b 47 breakpad/src/common/android \
3333a973
ER
48 breakpad/src/common/mac \
49 breakpad/src/tools/mac \
50 build/mac \
51 build/win \
55dddbd9
ER
52 chrome/android \
53 chrome/app/android \
9304218b
ER
54 chrome/app/resources/terms/chromeos \
55 chrome/app/theme/default_100_percent/cros_ \
3333a973
ER
56 chrome/app/theme/default_100_percent/mac \
57 chrome/app/theme/default_100_percent/win \
9304218b 58 chrome/app/theme/default_200_percent/cros_ \
3333a973
ER
59 chrome/app/theme/default_200_percent/mac \
60 chrome/app/theme/default_200_percent/win \
61 chrome/app/theme/touch_100_percent/win \
62 chrome/app/theme/touch_140_percent/win \
63 chrome/app/theme/touch_180_percent/win \
55dddbd9 64 chrome/browser/android \
9304218b 65 chrome/browser/chromeos/cros \
e31bf7c6 66 chrome/browser/extensions/docs \
55dddbd9 67 chrome/browser/history/android \
3333a973 68 chrome/browser/mac \
18ffc809 69 chrome/browser/resources/about_welcome_android \
9304218b 70 chrome/browser/resources/chromeos_ \
18ffc809 71 chrome/browser/resources/ntp_android \
9304218b
ER
72 chrome/browser/resources/options/chromeos_ \
73 chrome/browser/resources/shared/css/chromeos \
74 chrome/browser/resources/shared/js/chromeos_ \
9304218b 75 chrome/browser/ui/android \
dda6f58c 76 chrome/browser/ui/cocoa \
9304218b
ER
77 chrome/browser/ui/webui/chromeos \
78 chrome/browser/ui/webui/ntp/android \
79 chrome/browser/ui/webui/options/chromeos \
54623fc8 80 chrome/common/extensions/docs \
3333a973
ER
81 chrome/common/mac \
82 chrome/installer/mac \
83 chrome/installer/mac/third_party/xz/config/mac \
894dee72 84 chrome/installer/tools \
dda6f58c 85 chrome/third_party/jstemplate/tutorial_examples \
f2f193c6 86 third_party/jstemplate/tutorial_examples \
dda6f58c 87 chrome/third_party/mock4js/examples \
05d9087c 88 chrome/third_party/wtl/ \
9304218b 89 chrome/tools/build/chromeos \
3333a973
ER
90 chrome/tools/build/mac \
91 chrome/tools/build/win \
54623fc8 92 chrome_frame \
3333a973
ER
93 cloud_print/service/win \
94 cloud_print/virtual_driver/win \
55dddbd9
ER
95 content/app/android \
96 content/browser/android \
97 content/common/android \
894dee72
ER
98 content/components/navigation_interception/java \
99 content/components/web_contents_delegate_android/java \
55dddbd9
ER
100 content/public/android \
101 content/public/browser/android \
102 content/renderer/android \
103 content/shell/android \
3333a973 104 content/shell/mac \
54623fc8 105 data \
05d9087c
ER
106 gears \
107 google_update \
e31bf7c6 108 gpu/command_buffer/docs \
05d9087c 109 gpu/demos \
9304218b 110 media/audio/android \
e31bf7c6 111 media/audio/ios \
3333a973
ER
112 media/audio/mac \
113 media/audio/win \
9304218b 114 media/base/android \
894dee72 115 media/tools \
3333a973
ER
116 media/video/capture/mac \
117 media/video/capture/win \
9304218b 118 media/webm/chromeos \
063abe65 119 mesa/MesaLib/src/mesa/drivers/windows \
3333a973 120 native_client/build/mac \
e31bf7c6 121 native_client/documentation \
3333a973
ER
122 native_client/src/shared/imc/win \
123 native_client/src/shared/platform/win \
894dee72 124 native_client/src/tools \
3333a973
ER
125 native_client/src/trusted/debug_stub/win \
126 native_client/src/trusted/desc/win \
127 native_client/src/trusted/nonnacl_util/win \
128 native_client/src/trusted/platform_qualify/win \
894dee72 129 native_client/tools \
18ffc809 130 native_client/tools/trusted_cross_toolchains \
54623fc8 131 native_client_sdk \
3333a973 132 native_client_sdk/src/libraries/win \
9304218b 133 net/android \
894dee72
ER
134 net/tools \
135 net/tools/testserver \
063abe65 136 npapi/npspy/windows \
05d9087c 137 o3d \
54623fc8
ER
138 o3d/documentation \
139 o3d/samples \
e31bf7c6
ER
140 ppapi/c/documentation \
141 ppapi/cpp/documentation \
894dee72 142 ppapi/native_client/src/tools \
3333a973 143 ppapi/native_client/src/trusted/plugin/win \
894dee72 144 ppapi/native_client/tools \
3333a973 145 remoting/host/installer/mac \
e15125f5 146 remoting/host/installer/win \
3333a973 147 remoting/host/mac \
e15125f5 148 remoting/host/setup/win \
3333a973 149 remoting/host/win \
dda6f58c 150 rlz/examples \
3333a973
ER
151 rlz/mac \
152 rlz/win \
894dee72 153 sandbox/win/tools \
e31bf7c6 154 sdch/ios \
3333a973
ER
155 sdch/mac \
156 skia/config/win \
894dee72 157 sync/tools \
063abe65
ER
158 tcmalloc/chromium/src/windows \
159 tcmalloc/vendor/src/windows \
e31bf7c6 160 third_party/WebKit/Source/JavaScriptCore/docs \
894dee72 161 third_party/WebKit/Source/JavaScriptCore/tools \
55dddbd9 162 third_party/WebKit/Source/Platform/chromium/public/android \
3333a973
ER
163 third_party/WebKit/Source/Platform/chromium/public/mac \
164 third_party/WebKit/Source/Platform/chromium/public/win \
063abe65
ER
165 third_party/WebKit/Source/ThirdParty/gtest/samples \
166 third_party/WebKit/Source/ThirdParty/gyp/samples \
167 third_party/WebKit/Source/ThirdParty/gyp/samples/samples \
894dee72 168 third_party/WebKit/Source/ThirdParty/gyp/tools \
3333a973 169 third_party/WebKit/Source/WTF/wtf/mac \
4a263112 170 third_party/WebKit/Source/WTF/wtf/qt \
3333a973
ER
171 third_party/WebKit/Source/WTF/wtf/threads/win \
172 third_party/WebKit/Source/WTF/wtf/win \
173 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
174 third_party/WebKit/Source/WebCore/accessibility/mac \
4a263112 175 third_party/WebKit/Source/WebCore/accessibility/qt \
3333a973 176 third_party/WebKit/Source/WebCore/accessibility/win \
4a263112 177 third_party/WebKit/Source/WebCore/bridge/qt \
55dddbd9 178 third_party/WebKit/Source/WebCore/editing/android \
3333a973 179 third_party/WebKit/Source/WebCore/editing/mac \
4a263112 180 third_party/WebKit/Source/WebCore/editing/qt \
55dddbd9 181 third_party/WebKit/Source/WebCore/history/android \
3333a973 182 third_party/WebKit/Source/WebCore/history/mac \
4a263112 183 third_party/WebKit/Source/WebCore/history/qt \
3333a973
ER
184 third_party/WebKit/Source/WebCore/loader/mac \
185 third_party/WebKit/Source/WebCore/loader/win \
55dddbd9 186 third_party/WebKit/Source/WebCore/page/android \
3333a973 187 third_party/WebKit/Source/WebCore/page/mac \
4a263112 188 third_party/WebKit/Source/WebCore/page/qt \
3333a973
ER
189 third_party/WebKit/Source/WebCore/page/scrolling/mac \
190 third_party/WebKit/Source/WebCore/page/win \
55dddbd9 191 third_party/WebKit/Source/WebCore/platform/android \
3333a973 192 third_party/WebKit/Source/WebCore/platform/audio/mac \
4a263112 193 third_party/WebKit/Source/WebCore/platform/audio/qt \
3333a973 194 third_party/WebKit/Source/WebCore/platform/cf/win \
dda6f58c 195 third_party/WebKit/Source/WebCore/platform/cocoa \
3333a973
ER
196 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
197 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
dda6f58c 198 third_party/WebKit/Source/WebCore/platform/graphics/cocoa \
3333a973 199 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
4a263112 200 third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \
3333a973 201 third_party/WebKit/Source/WebCore/platform/graphics/mac \
4a263112 202 third_party/WebKit/Source/WebCore/platform/graphics/qt \
3333a973 203 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
4a263112 204 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \
e15125f5 205 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
3333a973 206 third_party/WebKit/Source/WebCore/platform/graphics/win \
e31bf7c6 207 third_party/WebKit/Source/WebCore/platform/ios \
3333a973 208 third_party/WebKit/Source/WebCore/platform/mac \
55dddbd9 209 third_party/WebKit/Source/WebCore/platform/network/android \
3333a973 210 third_party/WebKit/Source/WebCore/platform/network/mac \
4a263112 211 third_party/WebKit/Source/WebCore/platform/network/qt \
3333a973 212 third_party/WebKit/Source/WebCore/platform/network/win \
4a263112 213 third_party/WebKit/Source/WebCore/platform/qt \
55dddbd9 214 third_party/WebKit/Source/WebCore/platform/text/android \
3333a973 215 third_party/WebKit/Source/WebCore/platform/text/mac \
4a263112 216 third_party/WebKit/Source/WebCore/platform/text/qt \
3333a973
ER
217 third_party/WebKit/Source/WebCore/platform/text/win \
218 third_party/WebKit/Source/WebCore/platform/win \
219 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
220 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
221 third_party/WebKit/Source/WebCore/plugins/mac \
4a263112 222 third_party/WebKit/Source/WebCore/plugins/qt \
3333a973 223 third_party/WebKit/Source/WebCore/plugins/win \
55dddbd9 224 third_party/WebKit/Source/WebKit/chromium/public/android \
55dddbd9 225 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
3333a973
ER
226 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
227 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
228 third_party/WebKit/Source/WebKit/chromium/public/win \
55dddbd9 229 third_party/WebKit/Source/WebKit/chromium/src/android \
3333a973
ER
230 third_party/WebKit/Source/WebKit/chromium/src/mac \
231 third_party/WebKit/Source/WebKit/chromium/src/win \
e31bf7c6 232 third_party/WebKit/Source/WebKit/gtk/docs \
3333a973 233 third_party/WebKit/Source/WebKit/mac \
4a263112 234 third_party/WebKit/Source/WebKit/qt \
e31bf7c6 235 third_party/WebKit/Source/WebKit/qt/docs \
dda6f58c 236 third_party/WebKit/Source/WebKit/qt/examples \
3333a973 237 third_party/WebKit/Source/WebKit/win \
063abe65 238 third_party/WebKit/Source/WebKit/wx/bindings/python/samples \
3333a973
ER
239 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
240 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
241 third_party/WebKit/Source/WebKit2/Platform/mac \
242 third_party/WebKit/Source/WebKit2/Platform/win \
243 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
244 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
245 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
246 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
247 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
248 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
249 third_party/WebKit/Source/WebKit2/Shared/cg/win \
250 third_party/WebKit/Source/WebKit2/Shared/mac \
251 third_party/WebKit/Source/WebKit2/Shared/win \
252 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
253 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
254 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
255 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
256 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
257 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
258 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
259 third_party/WebKit/Source/WebKit2/UIProcess/mac \
260 third_party/WebKit/Source/WebKit2/UIProcess/win \
261 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
262 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
263 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
264 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
265 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
266 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
267 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
268 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
269 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
270 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
271 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
272 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
273 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
274 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
275 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
276 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
277 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
278 third_party/WebKit/Source/WebKit2/WebProcess/mac \
279 third_party/WebKit/Source/WebKit2/WebProcess/win \
280 third_party/WebKit/Source/WebKit2/mac \
281 third_party/WebKit/Source/WebKit2/win \
3333a973 282 third_party/WebKit/Tools/DumpRenderTree/mac \
4a263112 283 third_party/WebKit/Tools/DumpRenderTree/qt \
3333a973 284 third_party/WebKit/Tools/DumpRenderTree/win \
063abe65
ER
285 third_party/angle/extensions \
286 third_party/angle/samples \
54623fc8 287 third_party/angle/samples/gles2_book \
05d9087c
ER
288 third_party/boost \
289 third_party/bsdiff \
290 third_party/bspatch \
894dee72
ER
291 third_party/cacheinvalidation/src/example-app-build \
292 third_party/cacheinvalidation/src/java \
55dddbd9 293 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
55dddbd9 294 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
05d9087c 295 third_party/ffmpeg/binaries \
3333a973
ER
296 third_party/ffmpeg/chromium/binaries/Chromium/win \
297 third_party/ffmpeg/chromium/config/Chrome/mac \
e15125f5 298 third_party/ffmpeg/chromium/config/Chrome/win \
3333a973 299 third_party/ffmpeg/chromium/config/Chromium/mac \
e15125f5 300 third_party/ffmpeg/chromium/config/Chromium/win \
3333a973 301 third_party/ffmpeg/chromium/include/win \
e31bf7c6 302 third_party/ffmpeg/doc \
894dee72 303 third_party/ffmpeg/tools \
05d9087c 304 third_party/fuzzymatch \
8352ba82 305 third_party/gles2_book \
05d9087c
ER
306 third_party/gles_book_examples \
307 third_party/gold \
05d9087c 308 third_party/hunspell/dictionaries \
54623fc8 309 third_party/hunspell_dictionaries \
e31bf7c6 310 third_party/hyphen/doc \
55dddbd9 311 third_party/icu/android \
05d9087c
ER
312 third_party/icu/mac \
313 third_party/lcov \
e31bf7c6 314 third_party/leveldatabase/src/doc \
3333a973 315 third_party/leveldatabase/src/port/win \
dda6f58c 316 third_party/libjingle/source/talk/examples \
3333a973
ER
317 third_party/libjpeg_turbo/mac \
318 third_party/libjpeg_turbo/win \
55dddbd9 319 third_party/libva/va/android \
3333a973
ER
320 third_party/libvpx/source/config/mac \
321 third_party/libvpx/source/config/win \
322 third_party/libxml/mac \
54623fc8 323 third_party/lighttpd \
e31bf7c6 324 third_party/mesa/MesaLib/docs \
e31bf7c6 325 third_party/mesa/MesaLib/src/gallium/docs \
894dee72 326 third_party/npapi/npspy/extern/java \
05d9087c
ER
327 third_party/nspr \
328 third_party/nss \
329 third_party/ocmock \
55dddbd9 330 third_party/openssl/config/android \
894dee72 331 third_party/ots/tools \
05d9087c
ER
332 third_party/pthread \
333 third_party/pyftpdlib \
e31bf7c6 334 third_party/re2/doc \
05d9087c 335 third_party/scons \
894dee72 336 third_party/sfntly/cpp/src/sfntly/tools \
05d9087c 337 third_party/simplejson \
55dddbd9 338 third_party/skia/include/utils/android \
e31bf7c6 339 third_party/skia/include/utils/ios \
3333a973
ER
340 third_party/skia/include/utils/mac \
341 third_party/skia/include/utils/win \
55dddbd9
ER
342 third_party/skia/include/views/android \
343 third_party/skia/src/gpu/gl/android \
3333a973
ER
344 third_party/skia/src/gpu/gl/mac \
345 third_party/skia/src/gpu/gl/win \
e31bf7c6 346 third_party/skia/src/utils/ios \
3333a973
ER
347 third_party/skia/src/utils/mac \
348 third_party/skia/src/utils/win \
e31bf7c6 349 third_party/skia/src/views/ios \
3333a973
ER
350 third_party/skia/src/views/mac \
351 third_party/skia/src/views/win \
352 third_party/snappy/mac \
e31bf7c6
ER
353 third_party/sqlite/src/doc \
354 third_party/tcmalloc/vendor/doc \
dda6f58c
ER
355 third_party/trace-viewer/examples \
356 third_party/trace-viewer/third_party/pywebsocket/src/example \
54623fc8 357 third_party/vc_80 \
e31bf7c6 358 third_party/webdriver/pylib/docs \
55dddbd9 359 third_party/webrtc/modules/audio_device/android \
e31bf7c6 360 third_party/webrtc/modules/audio_device/ios \
3333a973
ER
361 third_party/webrtc/modules/audio_device/main/source/mac \
362 third_party/webrtc/modules/audio_device/main/source/win \
e15125f5 363 third_party/webrtc/modules/audio_device/win \
894dee72 364 third_party/webrtc/modules/video_capture/android/java \
55dddbd9 365 third_party/webrtc/modules/video_capture/main/source/android \
894dee72 366 third_party/webrtc/modules/video_render/android/java \
55dddbd9 367 third_party/webrtc/modules/video_render/main/source/android \
3333a973 368 third_party/webrtc/modules/video_render/main/source/mac \
55dddbd9 369 third_party/webrtc/system_wrappers/source/android \
55dddbd9 370 third_party/yasm/source/config/android \
3333a973
ER
371 third_party/yasm/source/config/mac \
372 third_party/yasm/source/config/win \
9304218b 373 tools/android \
063abe65
ER
374 tools/gyp/samples \
375 tools/gyp/samples/samples \
894dee72 376 tools/gyp/tools \
3333a973 377 tools/mac \
54623fc8 378 tools/site_compare \
05d9087c
ER
379 tools/stats_viewer \
380 tools/symsrc \
05d9087c 381 tools/valgrind \
3333a973 382 tools/win \
05d9087c 383 tools/wine_valgrind \
9304218b 384 ui/android \
dda6f58c 385 ui/base/cocoa \
e15125f5 386 ui/base/ime/win \
9304218b 387 ui/gfx/android \
3333a973 388 ui/gfx/mac \
9304218b
ER
389 ui/resources/default_100_percent/cros_ \
390 ui/resources/default_200_percent/cros_ \
dda6f58c 391 ui/views/examples \
3333a973 392 ui/views/win \
063abe65 393 v8/samples \
9304218b 394 webkit/chromeos \
55dddbd9 395 webkit/media/android \
063abe65
ER
396 webrtc/modules/video_capture/windows \
397 webrtc/modules/video_render/windows \
8352ba82 398 win8 \
f888c710
ER
399 ; do
400 rm -vfr "$dir"
401 done
0bb93ab2
ER
402
403 find $(ls -d \
404 base/mac \
405 base/win \
406 build/android \
407 chrome/browser/chromeos \
408 chrome/browser/component/web_contents_delegate_android \
409 chrome/tools \
410 chromeos \
411 content/browser/renderer_host/java \
412 content/common/mac \
413 content/renderer/java \
414 gpu/tools \
415 native_client/src/include/win \
416 native_client/src/trusted/service_runtime/win \
417 remoting/tools \
418 sandbox/win \
419 third_party/WebKit/Source/WebKit/chromium/public/mac \
420 third_party/WebKit/Tools \
421 third_party/cld/encodings/compact_lang_det/win \
422 third_party/cros_system_api \
423 third_party/mozc/chrome/chromeos \
424 third_party/sfntly/cpp/src/sample \
425 third_party/tcmalloc \
426 third_party/v8-i18n/tools \
427 third_party/webrtc/modules/video_coding/codecs/tools \
428 third_party/webrtc/tools \
429 ui/base/win \
430 v8/tools \
431 webkit/tools \
432 ) '!' -type d '(' \
0bb93ab2 433 '!' -name '*.grd' \
f2f193c6 434 '!' -name '*.gyp*' \
0bb93ab2
ER
435 '!' -path 'base/mac/bundle_locations.h' \
436 '!' -path 'base/mac/crash_logging.h' \
437 '!' -path 'base/win/windows_version.h' \
438 '!' -path 'build/android/cpufeatures.gypi' \
439 '!' -path 'chrome/browser/chromeos/contacts/contact.proto' \
f2f193c6
ER
440 '!' -path 'chrome/browser/chromeos/extensions/file_browser_handler_api.h' \
441 '!' -path 'chrome/browser/chromeos/extensions/networking_private_api.h' \
0bb93ab2
ER
442 '!' -path 'chrome/browser/chromeos/settings/cros_settings.h' \
443 '!' -path 'chrome/browser/chromeos/settings/cros_settings_names.h' \
444 '!' -path 'chrome/browser/chromeos/settings/cros_settings_provider.h' \
f2f193c6 445 '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \
0bb93ab2
ER
446 '!' -path 'chrome/tools/build/generate_policy_source.py' \
447 '!' -path 'chrome/tools/build/linux/sed.sh' \
448 '!' -path 'chrome/tools/build/make_version_cc.py' \
449 '!' -path 'chrome/tools/build/repack_locales.py' \
450 '!' -path 'chrome/tools/build/version.py' \
451 '!' -path 'chromeos/chromeos_export.h' \
f2f193c6
ER
452 '!' -path 'chromeos/dbus/dbus_client_implementation_type.h' \
453 '!' -path 'chromeos/dbus/session_manager_client.h' \
0bb93ab2
ER
454 '!' -path 'chromeos/network/onc/onc_constants.h' \
455 '!' -path 'content/browser/renderer_host/java/java_bridge_dispatcher_host_manager.h' \
456 '!' -path 'content/common/mac/attributed_string_coder.h' \
457 '!' -path 'content/common/mac/font_descriptor.h' \
458 '!' -path 'content/renderer/java/java_bridge_dispatcher.h' \
459 '!' -path 'native_client/src/include/win/mman.h' \
460 '!' -path 'native_client/src/trusted/service_runtime/win/debug_exception_handler.h' \
461 '!' -path 'native_client/src/trusted/service_runtime/win/exception_patch/ntdll_patch.h' \
462 '!' -path 'remoting/tools/verify_resources.py' \
463 '!' -path 'sandbox/win/src/sandbox_types.h' \
464 '!' -path 'third_party/WebKit/Source/WebKit/chromium/public/mac/WebSubstringUtil.h' \
465 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.cc' \
466 '!' -path 'third_party/cld/encodings/compact_lang_det/win/cld_*.h' \
467 '!' -path 'third_party/cros_system_api/dbus/*.proto' \
468 '!' -path 'third_party/cros_system_api/dbus/service_constants.h' \
469 '!' -path 'third_party/sfntly/cpp/src/sample/chromium/*' \
470 '!' -path 'third_party/tcmalloc/chromium/*' \
471 '!' -path 'third_party/v8-i18n/tools/js2c.py' \
472 '!' -path 'ui/base/win/dpi.h' \
473 '!' -path 'v8/tools/js2c.py' \
474 '!' -path 'v8/tools/jsmin.py' \
475 ')' \
476 -print -delete
f888c710
ER
477}
478
8352ba82
ER
479# There are directories we want to strip, but that are unnecessarily required by the build-system
480# So we drop everything but the gyp/gypi files
481almost_strip_dirs() {
482 local dir
483 for dir in \
f2f193c6 484 breakpad_ \
e31bf7c6 485 build/ios \
8352ba82 486 courgette \
18ffc809 487 third_party/cros_dbus_cplusplus \
8352ba82 488 ; do
0bb93ab2 489 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
8352ba82 490 done
bcc7de3a
ER
491
492 find tools -type f \
493 '!' -iname '*.gyp*' \
494 '!' -path 'tools/build/*' \
495 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
bdd77e01 496 '!' -path 'tools/compile_test/compile_test.py' \
108c5f7c
ER
497 '!' -path 'tools/generate_library_loader/*' \
498 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
bcc7de3a
ER
499 '!' -path 'tools/generate_stubs/*' \
500 '!' -path 'tools/grit/*' \
501 '!' -path 'tools/gritsettings/*' \
502 '!' -path 'tools/gyp/*' \
503 '!' -path 'tools/json_comment_eater.py' \
504 '!' -path 'tools/json_schema_compiler/*' \
108c5f7c 505 '!' -path 'tools/json_to_struct/*' \
f2f193c6 506 '!' -path 'tools/licenses.py' \
bcc7de3a 507 '!' -path 'tools/protoc_wrapper/*' \
f2f193c6 508 '!' -path 'tools/usb_ids/*' \
bcc7de3a
ER
509 '!' -path 'tools/uuidgen.py' \
510 '!' -path 'tools/zip2msi.py' \
511 -print -delete
8352ba82
ER
512}
513
e21194da
ER
514# clean third party
515# list based from archlinux PKGBUILD
516# https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
517clean_third_party() {
063abe65
ER
518 local dir
519 for dir in \
520 third_party/ashmem \
063abe65
ER
521 third_party/eyesfree \
522 third_party/guava \
f2f193c6 523 third_party/iaccessible2 \
063abe65
ER
524 third_party/icon_family \
525 third_party/isimpledom \
063abe65
ER
526 third_party/jsr-305 \
527 third_party/libexif \
528 third_party/mach_override \
f2f193c6
ER
529 third_party/npapi/npspy \
530 third_party/re2/benchlog \
063abe65 531 third_party/snappy \
063abe65
ER
532 third_party/sqlite/*.patch \
533 third_party/sqlite/src/*.patch \
f2f193c6 534 third_party/sudden_motion_sensor \
063abe65
ER
535 ; do
536 rm -vfr "$dir"
537 done
538
80b34a6e
ER
539 find third_party -type f \
540 '!' -iname '*.gyp*' \
15f29c79
ER
541 \! -path 'third_party/WebKit/*' \
542 \! -path 'third_party/adobe/flash/*' \
2759c83d
ER
543 \! -path 'third_party/angle/include/EGL/*' \
544 \! -path 'third_party/angle/include/GLSLANG/*' \
545 \! -path 'third_party/angle/src/common/*' \
546 \! -path 'third_party/angle/src/compiler/*' \
547 \! -path 'third_party/angle/src/third_party/compiler/*' \
e21194da
ER
548 \! -path 'third_party/cacheinvalidation/*' \
549 \! -path 'third_party/cld/*' \
15f29c79 550 \! -path 'third_party/cros_system_api/*' \
063abe65 551 \! -path 'third_party/flot/*.js' \
e21194da
ER
552 \! -path 'third_party/hunspell/*' \
553 \! -path 'third_party/hyphen/*' \
554 \! -path 'third_party/iccjpeg/*' \
80b34a6e 555 \! -path 'third_party/jstemplate/*' \
e21194da
ER
556 \! -path 'third_party/khronos/*' \
557 \! -path 'third_party/leveldatabase/*' \
15f29c79 558 \! -path 'third_party/libXNVCtrl/*' \
e21194da
ER
559 \! -path 'third_party/libjingle/*' \
560 \! -path 'third_party/libphonenumber/*' \
e21194da 561 \! -path 'third_party/libva/*' \
80b34a6e 562 \! -path 'third_party/libvpx/*' \
e21194da 563 \! -path 'third_party/libxml/chromium/*' \
e21194da 564 \! -path 'third_party/libyuv/*' \
063abe65 565 \! -path 'third_party/lss/*.h' \
27a6f7d1
ER
566 \! -path 'third_party/mesa/MesaLib/include/GL/gl.h' \
567 \! -path 'third_party/mesa/MesaLib/include/GL/glext.h' \
568 \! -path 'third_party/mesa/MesaLib/include/GL/glx.h' \
569 \! -path 'third_party/mesa/MesaLib/include/GL/glxext.h' \
570 \! -path 'third_party/mesa/MesaLib/include/GL/osmesa.h' \
e21194da 571 \! -path 'third_party/modp_b64/*' \
e21194da
ER
572 \! -path 'third_party/mt19937ar/*' \
573 \! -path 'third_party/npapi/*' \
e21194da 574 \! -path 'third_party/ots/*' \
e21194da 575 \! -path 'third_party/protobuf/*' \
e21194da
ER
576 \! -path 'third_party/qcms/*' \
577 \! -path 'third_party/re2/*' \
e21194da
ER
578 \! -path 'third_party/sfntly/*' \
579 \! -path 'third_party/skia/*' \
580 \! -path 'third_party/smhasher/*' \
e21194da
ER
581 \! -path 'third_party/sqlite/*' \
582 \! -path 'third_party/tcmalloc/*' \
e21194da
ER
583 \! -path 'third_party/trace-viewer/*' \
584 \! -path 'third_party/undoview/*' \
e21194da
ER
585 \! -path 'third_party/v8-i18n/*' \
586 \! -path 'third_party/v8/*' \
e21194da
ER
587 \! -path 'third_party/webrtc/*' \
588 \! -path 'third_party/widevine/*' \
80b34a6e 589 \! -path 'third_party/x86inc/*' \
e21194da
ER
590 -print -delete
591
e21194da
ER
592 rm -vf third_party/expat/files/lib/expat.h
593}
594
99f39995
ER
595# parts based on ubuntu debian/rules
596# http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
99f39995 597remove_bin_only() {
55dddbd9 598 find -type f \( \
99f39995 599 -iname \*.exe -o \
894dee72
ER
600 -iname \*.nexe -o \
601 -iname \*.fon -o \
602 -iname \*.ttf -o \
99f39995
ER
603 -iname \*.dll -o \
604 -iname \*.pdb -o \
605 -name \*.o -o \
606 -name \*.a -o \
607 -name \*.dylib \
608 \) -exec rm -fv {} \;
609}
610
611# removes dir, if the bcond is not turned off
612strip_system_dirs() {
613 local dir lib bcond
614 for dir in "$@"; do
615 lib=${dir##*/}
616 bcond=$(eval echo \$$lib)
cd09b941 617 [ "${bcond:-1}" = 0 ] && continue
99f39995
ER
618
619 # skip already removed dirs
620 test -d $dir || continue
621
0e308272 622 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
99f39995
ER
623 done
624}
625
da3dfa9f 626# remove test data and files
e31bf7c6 627# some scanned with find -name tests -o -name test -o -name test_data -o name testdata
da3dfa9f
ER
628# and find -iname *test*
629remove_tests() {
630 local dir
631
632 # full remove
633 for dir in \
634 ash/test \
635 base/test \
636 breakpad/src/client/windows/tests \
637 breakpad/src/common/linux/tests \
638 breakpad/src/common/tests \
e31bf7c6 639 cc/test \
da3dfa9f
ER
640 chrome/browser/chromeos/bluetooth/test \
641 chrome/browser/component_updater/test \
e31bf7c6 642 chrome/browser/extensions/api/test_ \
da3dfa9f
ER
643 chrome/browser/printing/cloud_print/test \
644 chrome/browser/resources/gaia_auth/test \
645 chrome/browser/resources/tracing/tests \
646 chrome/browser/sync/test \
e31bf7c6
ER
647 chrome/browser/ui/cocoa/test \
648 chrome/browser/ui/gtk/test \
da3dfa9f 649 chrome/browser/ui/tests \
e31bf7c6 650 chrome/browser/ui/views/test \
da3dfa9f
ER
651 chrome/installer/test \
652 chrome/test/chromeos \
653 chrome/test/data/firefox2_nss_mac \
654 chrome/test/data/safe_browsing/old \
655 chrome/test/logging/win \
656 chrome/test/pyautolib/chromeos \
657 chrome/test/webdriver/test \
e31bf7c6 658 chrome/test_ \
da3dfa9f
ER
659 chrome/tools/test \
660 chrome_frame/test \
661 chrome_frame/tools/test \
662 content/browser/worker_host/test \
e31bf7c6 663 content/common/gpu/testdata \
da3dfa9f
ER
664 content/public/test \
665 content/test \
666 courgette/testdata \
e31bf7c6
ER
667 device/bluetooth/test \
668 device/test \
da3dfa9f
ER
669 gpu/command_buffer/tests \
670 media/test \
671 media/tools/layout_tests/test_data \
e31bf7c6
ER
672 native_client/buildbot \
673 native_client/src/shared/platform/testdata \
674 native_client/src/trusted/gio/testdata \
675 native_client/src/trusted/interval_multiset/testdata \
da3dfa9f 676 native_client/src/trusted/service_runtime/testdata \
e31bf7c6 677 native_client/src/trusted/validator/x86/decoder/generator/testdata \
da3dfa9f 678 native_client/src/trusted/validator/x86/testing \
e31bf7c6
ER
679 native_client/src/trusted/validator_arm/testdata \
680 native_client/src/trusted/validator_mips/testdata \
681 native_client/src/trusted/validator_x86/testdata \
da3dfa9f 682 native_client/tests \
e31bf7c6 683 native_client/tools/testdata \
da3dfa9f
ER
684 native_client/tools/tests \
685 native_client_sdk/src/build_tools/tests \
686 native_client_sdk/src/libraries/c_salt/test \
687 net/test \
688 o3d/tests \
689 ppapi/native_client/tests \
690 ppapi/tests \
691 printing/test \
692 rlz/test \
693 sandbox/linux/seccomp-legacy/tests \
694 sandbox/linux/tests \
695 sandbox/tests \
696 sandbox/win/tests \
e31bf7c6 697 sdch/open-vcdiff/testdata \
da3dfa9f
ER
698 seccompsandbox/tests \
699 sync/internal_api/public/test \
700 sync/internal_api/test \
701 sync/test \
702 testing/android \
703 testing/gmock/scripts/test \
704 testing/gmock/test \
705 testing/gtest/scripts/test \
706 testing/gtest/test \
707 third_party/WebKit/LayoutTests \
708 third_party/WebKit/Source/JavaScriptCore/API/tests \
709 third_party/WebKit/Source/JavaScriptCore/qt/tests \
710 third_party/WebKit/Source/JavaScriptCore/tests \
711 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
712 third_party/WebKit/Source/ThirdParty/gtest/test \
713 third_party/WebKit/Source/ThirdParty/gyp/test \
714 third_party/WebKit/Source/ThirdParty/qunit/test \
715 third_party/WebKit/Source/WebCore/bindings/scripts/test \
716 third_party/WebKit/Source/WebCore/testing_ \
717 third_party/WebKit/Source/WebKit/chromium/tests \
718 third_party/WebKit/Source/WebKit/efl/tests \
719 third_party/WebKit/Source/WebKit/gtk/tests \
720 third_party/WebKit/Source/WebKit/qt/tests \
721 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
722 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
723 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
724 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
725 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
726 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
727 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
728 third_party/WebKit/Tools/Scripts/webkitpy/test \
729 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
730 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
731 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
732 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
733 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
734 third_party/WebKit/Tools/TestWebKitAPI/mac \
735 third_party/WebKit/Tools/TestWebKitAPI/win \
736 third_party/angle/tests \
737 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
e31bf7c6 738 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
da3dfa9f
ER
739 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
740 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
741 third_party/ffmpeg/tests \
742 third_party/harfbuzz/tests \
743 third_party/hunspell/tests \
744 third_party/hyphen/tests \
745 third_party/libexif/sources/test \
746 third_party/libjingle/source/talk/app/webrtc/test \
e31bf7c6 747 third_party/libjingle/source/talk/media/testdata \
da3dfa9f
ER
748 third_party/libphonenumber/src/resources/test \
749 third_party/libphonenumber/src/test \
750 third_party/libsrtp/srtp/crypto/test \
751 third_party/libsrtp/srtp/test \
e31bf7c6 752 third_party/libyuv/unit_test/testdata \
da3dfa9f
ER
753 third_party/mesa/MesaLib/src/gallium/tests \
754 third_party/openssl/openssl/crypto/des/t/test \
755 third_party/openssl/openssl/test \
756 third_party/ots/test \
e31bf7c6 757 third_party/protobuf/src/google/protobuf/testdata \
da3dfa9f
ER
758 third_party/protobuf/src/google/protobuf/testing \
759 third_party/re2/re2/testing \
760 third_party/safe_browsing/testing \
761 third_party/sfntly/cpp/src/test \
762 third_party/sqlite/src/test \
763 third_party/sqlite/test \
764 third_party/talloc/libreplace/test \
765 third_party/tcmalloc/chromium/src/tests \
766 third_party/tcmalloc/vendor/src/tests \
767 third_party/tlslite/test \
768 third_party/trace-viewer/test_data \
e31bf7c6
ER
769 third_party/trace-viewer/third_party/pywebsocket/src/test \
770 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
da3dfa9f
ER
771 third_party/v8-i18n/tests \
772 third_party/webdriver/pylib/test \
773 third_party/webdriver/test_data \
774 third_party/webrtc/modules/audio_device/test/android \
775 third_party/webrtc/modules/audio_processing/test/android \
e31bf7c6 776 third_party/webrtc/modules/utility/test \
da3dfa9f 777 third_party/webrtc/modules/video_capture/main/test/android \
e31bf7c6
ER
778 third_party/webrtc/system_wrappers/test \
779 third_party/webrtc/test \
da3dfa9f
ER
780 third_party/webrtc/test/testsupport/mac \
781 third_party/webrtc/video_engine/test/android \
782 third_party/webrtc/video_engine/test/auto_test/android \
783 third_party/webrtc/voice_engine/test/android \
784 third_party/xdg-utils/tests \
785 third_party/yasm/source/patched-yasm/libyasm/tests \
786 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
787 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
788 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
789 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
790 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
791 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
792 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
793 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
794 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
795 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
796 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
797 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
798 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
799 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
800 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
801 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
802 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
803 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
804 tools/clang/plugins/tests \
e31bf7c6 805 tools/grit/grit/testdata \
da3dfa9f 806 tools/gyp/test \
e31bf7c6 807 tools/gyp/tools/emacs/testdata \
da3dfa9f
ER
808 tools/page_cycler/webpagereplay/tests \
809 tools/perf_expectations/tests \
e31bf7c6 810 tools/swarm_client/tests \
da3dfa9f
ER
811 ui/app_list/test \
812 ui/aura/test \
813 ui/base/test \
814 ui/compositor/test \
815 ui/gfx/test \
816 ui/test \
817 ui/views/test \
818 v8/test \
e31bf7c6 819 webkit/compositor_bindings/test \
da3dfa9f
ER
820 webkit/data/layout_tests \
821 webkit/plugins/npapi/test \
822 webkit/tools/test/reference_build \
823 webkit/tools/test_shell/mac \
824 ; do
825 rm -vfr "$dir"
826 done
827
828 # partial remove (keep .gyp)
829 for dir in \
e31bf7c6 830 chrome/browser/nacl_host/test \
da3dfa9f
ER
831 chrome/test/data \
832 testing \
e31bf7c6
ER
833 third_party/webrtc/modules/audio_coding/codecs/cng/test \
834 third_party/webrtc/modules/audio_coding/codecs/g711/test \
835 third_party/webrtc/modules/audio_coding/codecs/g722/test \
836 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
837 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
838 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
839 third_party/webrtc/modules/audio_coding/main/test \
840 third_party/webrtc/modules/audio_coding/neteq/test \
841 third_party/webrtc/modules/audio_conference_mixer/test \
842 third_party/webrtc/modules/audio_device/test \
843 third_party/webrtc/modules/audio_processing/test \
844 third_party/webrtc/modules/rtp_rtcp/test \
845 third_party/webrtc/modules/udp_transport/test \
846 third_party/webrtc/modules/video_capture/main/test \
847 third_party/webrtc/modules/video_coding/codecs/test \
848 third_party/webrtc/modules/video_coding/codecs/vp8/test \
849 third_party/webrtc/modules/video_coding/main/test \
850 third_party/webrtc/modules/video_processing/main/test \
851 third_party/webrtc/modules/video_render/main/test \
852 third_party/webrtc/video_engine/test \
853 third_party/webrtc/voice_engine/test \
854 tools/json_schema_compiler/test \
da3dfa9f 855 ; do
e31bf7c6 856 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
da3dfa9f
ER
857 done
858
859 # link headers from system dir. too many files to patch, we don't even build tests
860 install -d testing/gtest/include
861 ln -s /usr/include/gtest testing/gtest/include/gtest
862
863 # delete unittest files
dda6f58c
ER
864 find . '(' \
865 -name '*_unittest*.*' \
063abe65
ER
866 -o -name '*_unittest.*' \
867 -o -name '*_unittest' \
868 -o -name 'test_*.*' \
dda6f58c
ER
869 -o -name '*_test.*' \
870 ')' '!' -name '*.gyp*' \
063abe65
ER
871 '!' -name '*.isolate' \
872 '!' -name '*.grd' \
dda6f58c 873 '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \
063abe65
ER
874 '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \
875 '!' -path './chrome/browser/extensions/api/test/test_api.*' \
876 '!' -path './chrome/browser/resources/net_internals/*' \
877 '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \
878 '!' -path './chrome/common/net/test_server_locations.*' \
879 '!' -path './chrome/test/base/test_switches.*' \
dda6f58c 880 '!' -path './chrome/test/perf/browser_perf_test.*' \
063abe65
ER
881 '!' -path './chrome/test/perf/perf_test.*' \
882 '!' -path './native_client/src/trusted/fault_injection/test_injection.*' \
883 '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \
884 '!' -path './net/base/test_completion_callback.*' \
885 '!' -path './net/base/test_data_stream.*' \
886 '!' -path './net/base/test_root_certs*' \
3b691646 887 '!' -path './remoting/base/resources_unittest.*' \
063abe65 888 '!' -path './third_party/skia/src/gpu/gr_unittests.*' \
bdd77e01 889 '!' -path './tools/compile_test/compile_test.py' \
063abe65
ER
890 '!' -path './ui/compositor/test_web_graphics_context_3d.*' \
891 '!' -path './webkit/fileapi/test_mount_point_provider.*' \
892 -print -delete || :
da3dfa9f
ER
893}
894
e31bf7c6
ER
895remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
896almost_strip_dirs > REMOVED-stripped.txt
897remove_bin_only > REMOVED-bin_only.txt
898remove_tests > REMOVED-tests.txt
99f39995
ER
899
900strip_system_dirs \
31187203 901 native_client/src/third_party_mod/jsoncpp \
99f39995 902 third_party/bzip2 \
80b34a6e 903 third_party/ffmpeg \
31187203 904 third_party/flac \
99f39995 905 third_party/icu \
31187203 906 third_party/jsoncpp \
42e551c9 907 third_party/libXNVCtrl \
99f39995 908 third_party/libevent \
07d26a0d 909 third_party/libexif \
99f39995 910 third_party/libjpeg \
07d26a0d 911 third_party/libmtp \
99f39995 912 third_party/libpng \
3ee15dec 913 third_party/libsrtp \
581aec44 914 third_party/libusb \
4b411ffe 915 third_party/libvpx \
31187203 916 third_party/libwebp \
99f39995 917 third_party/libxslt \
25d4e23c 918 third_party/mesa \
07d26a0d 919 third_party/opus \
75a27c2e 920 third_party/protobuf \
80b34a6e 921 third_party/re2 \
ed514974 922 third_party/speex \
e15125f5 923 third_party/yasm \
2a97b574 924 third_party/zlib \
99f39995 925 v8 \
e31bf7c6 926> REMOVED-system_dirs.txt
00360a4d 927
e31bf7c6 928clean_third_party > REMOVED-third_party.txt
fe547a32 929
cd09b941 930if [ "${v8:-1}" != "0" ]; then
fe547a32
ER
931 # The implementation files include v8 headers with full path,
932 # like #include "v8/include/v8.h". Make sure the system headers
933 # will be used.
598df428 934 rm -rf v8/include
fe547a32
ER
935 ln -s /usr/include v8/include
936fi
937
cd09b941 938if [ "${nacl:-1}" != "0" ]; then
fe547a32
ER
939 # NOTE: here is always x86_64
940 rm -rf native_client/toolchain/linux_x86_newlib
fe547a32 941fi
18ffc809 942
23e8b485
ER
943if [ "${emptydirs:-0}" != "0" ]; then
944 # cleanup empty dirs
945 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
946fi
e31bf7c6
ER
947
948# report what's in them
949for a in REMOVED-*.txt; do
950 cat $a
951done
This page took 0.249777 seconds and 4 git commands to generate.