7 # remove everything unless it's remove has been disabled with "0"
8 # "v8=0" means "do not remove v8"
11 # Strip tarball from some big directories not needed on the linux platform
12 # https://code.google.com/p/chromium/wiki/LinuxPackaging
13 # initial list from src/tools/export_tarball/export_tarball.py
14 # also removed non-linux files: find -name win -o -name mac -o name android -o name windows
15 # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
16 # find -type d -name *doc*
17 # find -type d -name *example*
18 # find -type d -name java
19 # find -type d -name tools
20 # find -type d -name samples
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
23 remove_nonessential_dirs() {
25 -name 'Android.mk' -o \
32 find -regextype posix-extended \
33 -regex '.*_(win|cros|mac)_.*.xtb' \
39 ash/resources/default_100_percent/cros_ \
40 ash/resources/default_200_percent/cros_ \
46 breakpad/src/client/mac \
47 breakpad/src/common/android \
48 breakpad/src/common/mac \
49 breakpad/src/tools/mac \
54 chrome/app/resources/terms/chromeos \
55 chrome/app/theme/default_100_percent/cros_ \
56 chrome/app/theme/default_100_percent/mac \
57 chrome/app/theme/default_100_percent/win \
58 chrome/app/theme/default_200_percent/cros_ \
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 \
64 chrome/browser/android \
65 chrome/browser/chromeos/cros \
66 chrome/browser/extensions/docs \
67 chrome/browser/history/android \
69 chrome/browser/resources/about_welcome_android \
70 chrome/browser/resources/chromeos_ \
71 chrome/browser/resources/ntp_android \
72 chrome/browser/resources/options/chromeos_ \
73 chrome/browser/resources/shared/css/chromeos \
74 chrome/browser/resources/shared/js/chromeos_ \
75 chrome/browser/ui/android \
76 chrome/browser/ui/cocoa \
77 chrome/browser/ui/webui/chromeos \
78 chrome/browser/ui/webui/ntp/android \
79 chrome/browser/ui/webui/options/chromeos \
80 chrome/common/extensions/docs \
82 chrome/installer/mac \
83 chrome/installer/mac/third_party/xz/config/mac \
84 chrome/installer/tools \
85 chrome/third_party/jstemplate/tutorial_examples \
86 third_party/jstemplate/tutorial_examples \
87 chrome/third_party/mock4js/examples \
88 chrome/third_party/wtl/ \
89 chrome/tools/build/chromeos \
90 chrome/tools/build/mac \
91 chrome/tools/build/win \
93 cloud_print/service/win \
94 cloud_print/virtual_driver/win \
96 content/browser/android \
97 content/common/android \
98 content/components/navigation_interception/java \
99 content/components/web_contents_delegate_android/java \
100 content/public/android \
101 content/public/browser/android \
102 content/renderer/android \
103 content/shell/android \
108 gpu/command_buffer/docs \
110 media/audio/android \
116 media/video/capture/mac \
117 media/video/capture/win \
118 media/webm/chromeos \
119 mesa/MesaLib/src/mesa/drivers/windows \
120 native_client/build/mac \
121 native_client/documentation \
122 native_client/src/shared/imc/win \
123 native_client/src/shared/platform/win \
124 native_client/src/tools \
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 \
129 native_client/tools \
130 native_client/tools/trusted_cross_toolchains \
132 native_client_sdk/src/libraries/win \
135 net/tools/testserver \
136 npapi/npspy/windows \
140 ppapi/c/documentation \
141 ppapi/cpp/documentation \
142 ppapi/native_client/src/tools \
143 ppapi/native_client/src/trusted/plugin/win \
144 ppapi/native_client/tools \
145 remoting/host/installer/mac \
146 remoting/host/installer/win \
148 remoting/host/setup/win \
158 tcmalloc/chromium/src/windows \
159 tcmalloc/vendor/src/windows \
160 third_party/WebKit/Source/JavaScriptCore/docs \
161 third_party/WebKit/Source/JavaScriptCore/tools \
162 third_party/WebKit/Source/Platform/chromium/public/android \
163 third_party/WebKit/Source/Platform/chromium/public/mac \
164 third_party/WebKit/Source/Platform/chromium/public/win \
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 \
168 third_party/WebKit/Source/ThirdParty/gyp/tools \
169 third_party/WebKit/Source/WTF/wtf/mac \
170 third_party/WebKit/Source/WTF/wtf/qt \
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 \
175 third_party/WebKit/Source/WebCore/accessibility/qt \
176 third_party/WebKit/Source/WebCore/accessibility/win \
177 third_party/WebKit/Source/WebCore/bridge/qt \
178 third_party/WebKit/Source/WebCore/editing/android \
179 third_party/WebKit/Source/WebCore/editing/mac \
180 third_party/WebKit/Source/WebCore/editing/qt \
181 third_party/WebKit/Source/WebCore/history/android \
182 third_party/WebKit/Source/WebCore/history/mac \
183 third_party/WebKit/Source/WebCore/history/qt \
184 third_party/WebKit/Source/WebCore/loader/mac \
185 third_party/WebKit/Source/WebCore/loader/win \
186 third_party/WebKit/Source/WebCore/page/android \
187 third_party/WebKit/Source/WebCore/page/mac \
188 third_party/WebKit/Source/WebCore/page/qt \
189 third_party/WebKit/Source/WebCore/page/scrolling/mac \
190 third_party/WebKit/Source/WebCore/page/win \
191 third_party/WebKit/Source/WebCore/platform/android \
192 third_party/WebKit/Source/WebCore/platform/audio/mac \
193 third_party/WebKit/Source/WebCore/platform/audio/qt \
194 third_party/WebKit/Source/WebCore/platform/cf/win \
195 third_party/WebKit/Source/WebCore/platform/cocoa \
196 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
197 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
198 third_party/WebKit/Source/WebCore/platform/graphics/cocoa \
199 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
200 third_party/WebKit/Source/WebCore/platform/graphics/gpu/qt \
201 third_party/WebKit/Source/WebCore/platform/graphics/mac \
202 third_party/WebKit/Source/WebCore/platform/graphics/qt \
203 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
204 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/qt \
205 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
206 third_party/WebKit/Source/WebCore/platform/graphics/win \
207 third_party/WebKit/Source/WebCore/platform/ios \
208 third_party/WebKit/Source/WebCore/platform/mac \
209 third_party/WebKit/Source/WebCore/platform/network/android \
210 third_party/WebKit/Source/WebCore/platform/network/mac \
211 third_party/WebKit/Source/WebCore/platform/network/qt \
212 third_party/WebKit/Source/WebCore/platform/network/win \
213 third_party/WebKit/Source/WebCore/platform/qt \
214 third_party/WebKit/Source/WebCore/platform/text/android \
215 third_party/WebKit/Source/WebCore/platform/text/mac \
216 third_party/WebKit/Source/WebCore/platform/text/qt \
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 \
222 third_party/WebKit/Source/WebCore/plugins/qt \
223 third_party/WebKit/Source/WebCore/plugins/win \
224 third_party/WebKit/Source/WebKit/chromium/public/android \
225 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
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 \
229 third_party/WebKit/Source/WebKit/chromium/src/android \
230 third_party/WebKit/Source/WebKit/chromium/src/mac \
231 third_party/WebKit/Source/WebKit/chromium/src/win \
232 third_party/WebKit/Source/WebKit/gtk/docs \
233 third_party/WebKit/Source/WebKit/mac \
234 third_party/WebKit/Source/WebKit/qt \
235 third_party/WebKit/Source/WebKit/qt/docs \
236 third_party/WebKit/Source/WebKit/qt/examples \
237 third_party/WebKit/Source/WebKit/win \
238 third_party/WebKit/Source/WebKit/wx/bindings/python/samples \
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 \
282 third_party/WebKit/Tools/DumpRenderTree/mac \
283 third_party/WebKit/Tools/DumpRenderTree/qt \
284 third_party/WebKit/Tools/DumpRenderTree/win \
285 third_party/angle/extensions \
286 third_party/angle/samples \
287 third_party/angle/samples/gles2_book \
290 third_party/bspatch \
291 third_party/cacheinvalidation/src/example-app-build \
292 third_party/cacheinvalidation/src/java \
293 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
294 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
295 third_party/ffmpeg/binaries \
296 third_party/ffmpeg/chromium/binaries/Chromium/win \
297 third_party/ffmpeg/chromium/config/Chrome/mac \
298 third_party/ffmpeg/chromium/config/Chrome/win \
299 third_party/ffmpeg/chromium/config/Chromium/mac \
300 third_party/ffmpeg/chromium/config/Chromium/win \
301 third_party/ffmpeg/chromium/include/win \
302 third_party/ffmpeg/doc \
303 third_party/ffmpeg/tools \
304 third_party/fuzzymatch \
305 third_party/gles2_book \
306 third_party/gles_book_examples \
308 third_party/hunspell/dictionaries \
309 third_party/hunspell_dictionaries \
310 third_party/hyphen/doc \
311 third_party/icu/android \
312 third_party/icu/mac \
314 third_party/leveldatabase/src/doc \
315 third_party/leveldatabase/src/port/win \
316 third_party/libjingle/source/talk/examples \
317 third_party/libjpeg_turbo/mac \
318 third_party/libjpeg_turbo/win \
319 third_party/libva/va/android \
320 third_party/libvpx/source/config/mac \
321 third_party/libvpx/source/config/win \
322 third_party/libxml/mac \
323 third_party/lighttpd \
324 third_party/mesa/MesaLib/docs \
325 third_party/mesa/MesaLib/src/gallium/docs \
326 third_party/npapi/npspy/extern/java \
330 third_party/openssl/config/android \
331 third_party/ots/tools \
332 third_party/pthread \
333 third_party/pyftpdlib \
334 third_party/re2/doc \
336 third_party/sfntly/cpp/src/sfntly/tools \
337 third_party/simplejson \
338 third_party/skia/include/utils/android \
339 third_party/skia/include/utils/ios \
340 third_party/skia/include/utils/mac \
341 third_party/skia/include/utils/win \
342 third_party/skia/include/views/android \
343 third_party/skia/src/gpu/gl/android \
344 third_party/skia/src/gpu/gl/mac \
345 third_party/skia/src/gpu/gl/win \
346 third_party/skia/src/utils/ios \
347 third_party/skia/src/utils/mac \
348 third_party/skia/src/utils/win \
349 third_party/skia/src/views/ios \
350 third_party/skia/src/views/mac \
351 third_party/skia/src/views/win \
352 third_party/snappy/mac \
353 third_party/sqlite/src/doc \
354 third_party/tcmalloc/vendor/doc \
355 third_party/trace-viewer/examples \
356 third_party/trace-viewer/third_party/pywebsocket/src/example \
358 third_party/webdriver/pylib/docs \
359 third_party/webrtc/modules/audio_device/android \
360 third_party/webrtc/modules/audio_device/ios \
361 third_party/webrtc/modules/audio_device/main/source/mac \
362 third_party/webrtc/modules/audio_device/main/source/win \
363 third_party/webrtc/modules/audio_device/win \
364 third_party/webrtc/modules/video_capture/android/java \
365 third_party/webrtc/modules/video_capture/main/source/android \
366 third_party/webrtc/modules/video_render/android/java \
367 third_party/webrtc/modules/video_render/main/source/android \
368 third_party/webrtc/modules/video_render/main/source/mac \
369 third_party/webrtc/system_wrappers/source/android \
370 third_party/yasm/source/config/android \
371 third_party/yasm/source/config/mac \
372 third_party/yasm/source/config/win \
375 tools/gyp/samples/samples \
383 tools/wine_valgrind \
389 ui/resources/default_100_percent/cros_ \
390 ui/resources/default_200_percent/cros_ \
395 webkit/media/android \
396 webrtc/modules/video_capture/windows \
397 webrtc/modules/video_render/windows \
407 chrome/browser/chromeos \
408 chrome/browser/component/web_contents_delegate_android \
411 content/browser/renderer_host/java \
413 content/renderer/java \
415 native_client/src/include/win \
416 native_client/src/trusted/service_runtime/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 \
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' \
440 '!' -path 'chrome/browser/chromeos/extensions/file_browser_handler_api.h' \
441 '!' -path 'chrome/browser/chromeos/extensions/networking_private_api.h' \
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' \
445 '!' -path 'chrome/browser/chromeos/settings/device_settings_service.h' \
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' \
452 '!' -path 'chromeos/dbus/dbus_client_implementation_type.h' \
453 '!' -path 'chromeos/dbus/session_manager_client.h' \
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' \
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
481 almost_strip_dirs() {
487 third_party/cros_dbus_cplusplus \
489 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
493 '!' -iname '*.gyp*' \
494 '!' -path 'tools/build/*' \
495 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
496 '!' -path 'tools/compile_test/compile_test.py' \
497 '!' -path 'tools/generate_library_loader/*' \
498 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
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/*' \
505 '!' -path 'tools/json_to_struct/*' \
506 '!' -path 'tools/licenses.py' \
507 '!' -path 'tools/protoc_wrapper/*' \
508 '!' -path 'tools/usb_ids/*' \
509 '!' -path 'tools/uuidgen.py' \
510 '!' -path 'tools/zip2msi.py' \
515 # list based from archlinux PKGBUILD
516 # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
517 clean_third_party() {
521 third_party/eyesfree \
523 third_party/iaccessible2 \
524 third_party/icon_family \
525 third_party/isimpledom \
526 third_party/jsoncpp \
527 third_party/jsr-305 \
528 third_party/libexif \
529 third_party/mach_override \
530 third_party/npapi/npspy \
531 third_party/re2/benchlog \
533 third_party/sqlite/*.patch \
534 third_party/sqlite/src/*.patch \
535 third_party/sudden_motion_sensor \
540 find third_party -type f \
541 '!' -iname '*.gyp*' \
542 \! -path 'third_party/WebKit/*' \
543 \! -path 'third_party/adobe/flash/*' \
544 \! -path 'third_party/angle/include/EGL/*' \
545 \! -path 'third_party/angle/include/GLSLANG/*' \
546 \! -path 'third_party/angle/src/common/*' \
547 \! -path 'third_party/angle/src/compiler/*' \
548 \! -path 'third_party/angle/src/third_party/compiler/*' \
549 \! -path 'third_party/cacheinvalidation/*' \
550 \! -path 'third_party/cld/*' \
551 \! -path 'third_party/cros_system_api/*' \
552 \! -path 'third_party/flot/*.js' \
553 \! -path 'third_party/hunspell/*' \
554 \! -path 'third_party/hyphen/*' \
555 \! -path 'third_party/iccjpeg/*' \
556 \! -path 'third_party/jstemplate/*' \
557 \! -path 'third_party/khronos/*' \
558 \! -path 'third_party/leveldatabase/*' \
559 \! -path 'third_party/libXNVCtrl/*' \
560 \! -path 'third_party/libjingle/*' \
561 \! -path 'third_party/libphonenumber/*' \
562 \! -path 'third_party/libva/*' \
563 \! -path 'third_party/libvpx/*' \
564 \! -path 'third_party/libxml/chromium/*' \
565 \! -path 'third_party/libyuv/*' \
566 \! -path 'third_party/lss/*.h' \
567 \! -path 'third_party/mesa/MesaLib/include/GL/gl.h' \
568 \! -path 'third_party/mesa/MesaLib/include/GL/glext.h' \
569 \! -path 'third_party/mesa/MesaLib/include/GL/glx.h' \
570 \! -path 'third_party/mesa/MesaLib/include/GL/glxext.h' \
571 \! -path 'third_party/mesa/MesaLib/include/GL/osmesa.h' \
572 \! -path 'third_party/modp_b64/*' \
573 \! -path 'third_party/mt19937ar/*' \
574 \! -path 'third_party/npapi/*' \
575 \! -path 'third_party/ots/*' \
576 \! -path 'third_party/protobuf/*' \
577 \! -path 'third_party/qcms/*' \
578 \! -path 'third_party/re2/*' \
579 \! -path 'third_party/sfntly/*' \
580 \! -path 'third_party/skia/*' \
581 \! -path 'third_party/smhasher/*' \
582 \! -path 'third_party/sqlite/*' \
583 \! -path 'third_party/tcmalloc/*' \
584 \! -path 'third_party/trace-viewer/*' \
585 \! -path 'third_party/undoview/*' \
586 \! -path 'third_party/v8-i18n/*' \
587 \! -path 'third_party/v8/*' \
588 \! -path 'third_party/webrtc/*' \
589 \! -path 'third_party/widevine/*' \
590 \! -path 'third_party/x86inc/*' \
593 rm -vf third_party/expat/files/lib/expat.h
596 # parts based on ubuntu debian/rules
597 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
609 \) -exec rm -fv {} \;
612 # removes dir, if the bcond is not turned off
613 strip_system_dirs() {
617 bcond=$(eval echo \$$lib)
618 [ "${bcond:-1}" = 0 ] && continue
620 # skip already removed dirs
621 test -d $dir || continue
623 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
627 # remove test data and files
628 # some scanned with find -name tests -o -name test -o -name test_data -o name testdata
629 # and find -iname *test*
637 breakpad/src/client/windows/tests \
638 breakpad/src/common/linux/tests \
639 breakpad/src/common/tests \
641 chrome/browser/chromeos/bluetooth/test \
642 chrome/browser/component_updater/test \
643 chrome/browser/extensions/api/test_ \
644 chrome/browser/printing/cloud_print/test \
645 chrome/browser/resources/gaia_auth/test \
646 chrome/browser/resources/tracing/tests \
647 chrome/browser/sync/test \
648 chrome/browser/ui/cocoa/test \
649 chrome/browser/ui/gtk/test \
650 chrome/browser/ui/tests \
651 chrome/browser/ui/views/test \
652 chrome/installer/test \
653 chrome/test/chromeos \
654 chrome/test/data/firefox2_nss_mac \
655 chrome/test/data/safe_browsing/old \
656 chrome/test/logging/win \
657 chrome/test/pyautolib/chromeos \
658 chrome/test/webdriver/test \
662 chrome_frame/tools/test \
663 content/browser/worker_host/test \
664 content/common/gpu/testdata \
665 content/public/test \
668 device/bluetooth/test \
670 gpu/command_buffer/tests \
672 media/tools/layout_tests/test_data \
673 native_client/buildbot \
674 native_client/src/shared/platform/testdata \
675 native_client/src/trusted/gio/testdata \
676 native_client/src/trusted/interval_multiset/testdata \
677 native_client/src/trusted/service_runtime/testdata \
678 native_client/src/trusted/validator/x86/decoder/generator/testdata \
679 native_client/src/trusted/validator/x86/testing \
680 native_client/src/trusted/validator_arm/testdata \
681 native_client/src/trusted/validator_mips/testdata \
682 native_client/src/trusted/validator_x86/testdata \
683 native_client/tests \
684 native_client/tools/testdata \
685 native_client/tools/tests \
686 native_client_sdk/src/build_tools/tests \
687 native_client_sdk/src/libraries/c_salt/test \
690 ppapi/native_client/tests \
694 sandbox/linux/seccomp-legacy/tests \
695 sandbox/linux/tests \
698 sdch/open-vcdiff/testdata \
699 seccompsandbox/tests \
700 sync/internal_api/public/test \
701 sync/internal_api/test \
704 testing/gmock/scripts/test \
706 testing/gtest/scripts/test \
708 third_party/WebKit/LayoutTests \
709 third_party/WebKit/Source/JavaScriptCore/API/tests \
710 third_party/WebKit/Source/JavaScriptCore/qt/tests \
711 third_party/WebKit/Source/JavaScriptCore/tests \
712 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
713 third_party/WebKit/Source/ThirdParty/gtest/test \
714 third_party/WebKit/Source/ThirdParty/gyp/test \
715 third_party/WebKit/Source/ThirdParty/qunit/test \
716 third_party/WebKit/Source/WebCore/bindings/scripts/test \
717 third_party/WebKit/Source/WebCore/testing_ \
718 third_party/WebKit/Source/WebKit/chromium/tests \
719 third_party/WebKit/Source/WebKit/efl/tests \
720 third_party/WebKit/Source/WebKit/gtk/tests \
721 third_party/WebKit/Source/WebKit/qt/tests \
722 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
723 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
724 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
725 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
726 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
727 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
728 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
729 third_party/WebKit/Tools/Scripts/webkitpy/test \
730 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
731 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
732 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
733 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
734 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
735 third_party/WebKit/Tools/TestWebKitAPI/mac \
736 third_party/WebKit/Tools/TestWebKitAPI/win \
737 third_party/angle/tests \
738 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
739 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
740 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
741 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
742 third_party/ffmpeg/tests \
743 third_party/harfbuzz/tests \
744 third_party/hunspell/tests \
745 third_party/hyphen/tests \
746 third_party/libexif/sources/test \
747 third_party/libjingle/source/talk/app/webrtc/test \
748 third_party/libjingle/source/talk/media/testdata \
749 third_party/libphonenumber/src/resources/test \
750 third_party/libphonenumber/src/test \
751 third_party/libsrtp/srtp/crypto/test \
752 third_party/libsrtp/srtp/test \
753 third_party/libyuv/unit_test/testdata \
754 third_party/mesa/MesaLib/src/gallium/tests \
755 third_party/openssl/openssl/crypto/des/t/test \
756 third_party/openssl/openssl/test \
757 third_party/ots/test \
758 third_party/protobuf/src/google/protobuf/testdata \
759 third_party/protobuf/src/google/protobuf/testing \
760 third_party/re2/re2/testing \
761 third_party/safe_browsing/testing \
762 third_party/sfntly/cpp/src/test \
763 third_party/sqlite/src/test \
764 third_party/sqlite/test \
765 third_party/talloc/libreplace/test \
766 third_party/tcmalloc/chromium/src/tests \
767 third_party/tcmalloc/vendor/src/tests \
768 third_party/tlslite/test \
769 third_party/trace-viewer/test_data \
770 third_party/trace-viewer/third_party/pywebsocket/src/test \
771 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
772 third_party/v8-i18n/tests \
773 third_party/webdriver/pylib/test \
774 third_party/webdriver/test_data \
775 third_party/webrtc/modules/audio_device/test/android \
776 third_party/webrtc/modules/audio_processing/test/android \
777 third_party/webrtc/modules/utility/test \
778 third_party/webrtc/modules/video_capture/main/test/android \
779 third_party/webrtc/system_wrappers/test \
780 third_party/webrtc/test \
781 third_party/webrtc/test/testsupport/mac \
782 third_party/webrtc/video_engine/test/android \
783 third_party/webrtc/video_engine/test/auto_test/android \
784 third_party/webrtc/voice_engine/test/android \
785 third_party/xdg-utils/tests \
786 third_party/yasm/source/patched-yasm/libyasm/tests \
787 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
788 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
789 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
790 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
791 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
792 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
793 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
794 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
795 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
796 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
797 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
798 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
799 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
800 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
801 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
802 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
803 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
804 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
805 tools/clang/plugins/tests \
806 tools/grit/grit/testdata \
808 tools/gyp/tools/emacs/testdata \
809 tools/page_cycler/webpagereplay/tests \
810 tools/perf_expectations/tests \
811 tools/swarm_client/tests \
820 webkit/compositor_bindings/test \
821 webkit/data/layout_tests \
822 webkit/plugins/npapi/test \
823 webkit/tools/test/reference_build \
824 webkit/tools/test_shell/mac \
829 # partial remove (keep .gyp)
831 chrome/browser/nacl_host/test \
834 third_party/webrtc/modules/audio_coding/codecs/cng/test \
835 third_party/webrtc/modules/audio_coding/codecs/g711/test \
836 third_party/webrtc/modules/audio_coding/codecs/g722/test \
837 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
838 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
839 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
840 third_party/webrtc/modules/audio_coding/main/test \
841 third_party/webrtc/modules/audio_coding/neteq/test \
842 third_party/webrtc/modules/audio_conference_mixer/test \
843 third_party/webrtc/modules/audio_device/test \
844 third_party/webrtc/modules/audio_processing/test \
845 third_party/webrtc/modules/rtp_rtcp/test \
846 third_party/webrtc/modules/udp_transport/test \
847 third_party/webrtc/modules/video_capture/main/test \
848 third_party/webrtc/modules/video_coding/codecs/test \
849 third_party/webrtc/modules/video_coding/codecs/vp8/test \
850 third_party/webrtc/modules/video_coding/main/test \
851 third_party/webrtc/modules/video_processing/main/test \
852 third_party/webrtc/modules/video_render/main/test \
853 third_party/webrtc/video_engine/test \
854 third_party/webrtc/voice_engine/test \
855 tools/json_schema_compiler/test \
857 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
860 # link headers from system dir. too many files to patch, we don't even build tests
861 install -d testing/gtest/include
862 ln -s /usr/include/gtest testing/gtest/include/gtest
864 # delete unittest files
866 -name '*_unittest*.*' \
867 -o -name '*_unittest.*' \
868 -o -name '*_unittest' \
869 -o -name 'test_*.*' \
870 -o -name '*_test.*' \
871 ')' '!' -name '*.gyp*' \
872 '!' -name '*.isolate' \
874 '!' -path './chrome/browser/diagnostics/diagnostics_test.*' \
875 '!' -path './chrome/browser/extensions/api/declarative/test_rules_registry.*' \
876 '!' -path './chrome/browser/extensions/api/test/test_api.*' \
877 '!' -path './chrome/browser/resources/net_internals/*' \
878 '!' -path './chrome/browser/ui/webui/test_chrome_web_ui_controller_factory*' \
879 '!' -path './chrome/common/net/test_server_locations.*' \
880 '!' -path './chrome/test/base/test_switches.*' \
881 '!' -path './chrome/test/perf/browser_perf_test.*' \
882 '!' -path './chrome/test/perf/perf_test.*' \
883 '!' -path './native_client/src/trusted/fault_injection/test_injection.*' \
884 '!' -path './native_client/src/trusted/service_runtime/env_cleanser_test.h' \
885 '!' -path './net/base/test_completion_callback.*' \
886 '!' -path './net/base/test_data_stream.*' \
887 '!' -path './net/base/test_root_certs*' \
888 '!' -path './remoting/base/resources_unittest.*' \
889 '!' -path './third_party/skia/src/gpu/gr_unittests.*' \
890 '!' -path './tools/compile_test/compile_test.py' \
891 '!' -path './ui/compositor/test_web_graphics_context_3d.*' \
892 '!' -path './webkit/fileapi/test_mount_point_provider.*' \
896 remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
897 almost_strip_dirs > REMOVED-stripped.txt
898 remove_bin_only > REMOVED-bin_only.txt
899 remove_tests > REMOVED-tests.txt
902 native_client/src/third_party_mod/jsoncpp \
907 third_party/jsoncpp \
908 third_party/libXNVCtrl \
909 third_party/libevent \
910 third_party/libexif \
911 third_party/libjpeg \
914 third_party/libsrtp \
917 third_party/libwebp \
918 third_party/libxslt \
921 third_party/protobuf \
927 > REMOVED-system_dirs.txt
929 clean_third_party > REMOVED-third_party.txt
931 if [ "${v8:-1}" != "0" ]; then
932 # The implementation files include v8 headers with full path,
933 # like #include "v8/include/v8.h". Make sure the system headers
936 ln -s /usr/include v8/include
939 if [ "${nacl:-1}" != "0" ]; then
940 # NOTE: here is always x86_64
941 rm -rf native_client/toolchain/linux_x86_newlib
944 if [ "${emptydirs:-0}" != "0" ]; then
946 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
949 # report what's in them
950 for a in REMOVED-*.txt; do