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
15 # find -type d -name 'android' -o -name 'chromeos' -o -name 'cros'
16 # find -type d -name *doc*
18 # suffix with _ those that we can't remove (just yet) because of the gclient
19 # hooks (see build/all.gyp) or of some unneeded deps/includes
20 remove_nonessential_dirs() {
24 ash/resources/default_100_percent/cros_ \
25 ash/resources/default_200_percent/cros_ \
32 breakpad/src/client/mac \
33 breakpad/src/common/android \
34 breakpad/src/common/mac \
35 breakpad/src/tools/mac \
41 chrome/app/resources/terms/chromeos \
42 chrome/app/theme/default_100_percent/cros_ \
43 chrome/app/theme/default_100_percent/mac \
44 chrome/app/theme/default_100_percent/win \
45 chrome/app/theme/default_200_percent/cros_ \
46 chrome/app/theme/default_200_percent/mac \
47 chrome/app/theme/default_200_percent/win \
48 chrome/app/theme/touch_100_percent/win \
49 chrome/app/theme/touch_140_percent/win \
50 chrome/app/theme/touch_180_percent/win \
51 chrome/browser/android \
52 chrome/browser/chromeos/cros \
53 chrome/browser/chromeos_ \
54 chrome/browser/component/web_contents_delegate_android_ \
55 chrome/browser/extensions/docs \
56 chrome/browser/history/android \
58 chrome/browser/resources/about_welcome_android \
59 chrome/browser/resources/chromeos_ \
60 chrome/browser/resources/ntp_android \
61 chrome/browser/resources/options/chromeos_ \
62 chrome/browser/resources/shared/css/chromeos \
63 chrome/browser/resources/shared/js/chromeos_ \
64 chrome/browser/ui/android \
65 chrome/browser/ui/webui/chromeos \
66 chrome/browser/ui/webui/ntp/android \
67 chrome/browser/ui/webui/options/chromeos \
68 chrome/common/extensions/docs \
70 chrome/installer/mac \
71 chrome/installer/mac/third_party/xz/config/mac \
72 chrome/third_party/wtl/ \
73 chrome/tools/build/chromeos \
74 chrome/tools/build/mac \
75 chrome/tools/build/win \
78 cloud_print/service/win \
79 cloud_print/virtual_driver/win \
81 content/browser/android \
82 content/common/android \
84 content/public/android \
85 content/public/browser/android \
86 content/renderer/android \
87 content/shell/android \
92 gpu/command_buffer/docs \
99 media/video/capture/mac \
100 media/video/capture/win \
101 media/webm/chromeos \
102 native_client/build/mac \
103 native_client/documentation \
104 native_client/src/include/win_ \
105 native_client/src/shared/imc/win \
106 native_client/src/shared/platform/win \
107 native_client/src/trusted/debug_stub/win \
108 native_client/src/trusted/desc/win \
109 native_client/src/trusted/nonnacl_util/win \
110 native_client/src/trusted/platform_qualify/win \
111 native_client/src/trusted/service_runtime/win_ \
112 native_client/tools/trusted_cross_toolchains \
114 native_client_sdk/src/libraries/win \
119 ppapi/c/documentation \
120 ppapi/cpp/documentation \
121 ppapi/native_client/src/trusted/plugin/win \
122 remoting/host/installer/mac \
123 remoting/host/installer/win \
125 remoting/host/setup/win \
133 third_party/WebKit/Source/JavaScriptCore/docs \
134 third_party/WebKit/Source/Platform/chromium/public/android \
135 third_party/WebKit/Source/Platform/chromium/public/mac \
136 third_party/WebKit/Source/Platform/chromium/public/win \
137 third_party/WebKit/Source/WTF/wtf/mac \
138 third_party/WebKit/Source/WTF/wtf/threads/win \
139 third_party/WebKit/Source/WTF/wtf/win \
140 third_party/WebKit/Source/WebCore/WebCore.gyp/mac \
141 third_party/WebKit/Source/WebCore/accessibility/mac \
142 third_party/WebKit/Source/WebCore/accessibility/win \
143 third_party/WebKit/Source/WebCore/editing/android \
144 third_party/WebKit/Source/WebCore/editing/mac \
145 third_party/WebKit/Source/WebCore/history/android \
146 third_party/WebKit/Source/WebCore/history/mac \
147 third_party/WebKit/Source/WebCore/loader/mac \
148 third_party/WebKit/Source/WebCore/loader/win \
149 third_party/WebKit/Source/WebCore/page/android \
150 third_party/WebKit/Source/WebCore/page/mac \
151 third_party/WebKit/Source/WebCore/page/scrolling/mac \
152 third_party/WebKit/Source/WebCore/page/win \
153 third_party/WebKit/Source/WebCore/platform/android \
154 third_party/WebKit/Source/WebCore/platform/audio/mac \
155 third_party/WebKit/Source/WebCore/platform/cf/win \
156 third_party/WebKit/Source/WebCore/platform/graphics/ca/mac \
157 third_party/WebKit/Source/WebCore/platform/graphics/ca/win \
158 third_party/WebKit/Source/WebCore/platform/graphics/gpu/mac \
159 third_party/WebKit/Source/WebCore/platform/graphics/mac \
160 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/mac \
161 third_party/WebKit/Source/WebCore/platform/graphics/surfaces/win \
162 third_party/WebKit/Source/WebCore/platform/graphics/win \
163 third_party/WebKit/Source/WebCore/platform/ios \
164 third_party/WebKit/Source/WebCore/platform/mac \
165 third_party/WebKit/Source/WebCore/platform/network/android \
166 third_party/WebKit/Source/WebCore/platform/network/mac \
167 third_party/WebKit/Source/WebCore/platform/network/win \
168 third_party/WebKit/Source/WebCore/platform/text/android \
169 third_party/WebKit/Source/WebCore/platform/text/mac \
170 third_party/WebKit/Source/WebCore/platform/text/win \
171 third_party/WebKit/Source/WebCore/platform/win \
172 third_party/WebKit/Source/WebCore/platform/wx/wxcode/mac \
173 third_party/WebKit/Source/WebCore/platform/wx/wxcode/win \
174 third_party/WebKit/Source/WebCore/plugins/mac \
175 third_party/WebKit/Source/WebCore/plugins/win \
176 third_party/WebKit/Source/WebKit/chromium/public/android \
177 third_party/WebKit/Source/WebKit/chromium/public/mac_ \
178 third_party/WebKit/Source/WebKit/chromium/public/platform/android \
179 third_party/WebKit/Source/WebKit/chromium/public/platform/mac \
180 third_party/WebKit/Source/WebKit/chromium/public/platform/win \
181 third_party/WebKit/Source/WebKit/chromium/public/win \
182 third_party/WebKit/Source/WebKit/chromium/src/android \
183 third_party/WebKit/Source/WebKit/chromium/src/mac \
184 third_party/WebKit/Source/WebKit/chromium/src/win \
185 third_party/WebKit/Source/WebKit/gtk/docs \
186 third_party/WebKit/Source/WebKit/mac \
187 third_party/WebKit/Source/WebKit/qt/docs \
188 third_party/WebKit/Source/WebKit/win \
189 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/mac \
190 third_party/WebKit/Source/WebKit2/Platform/CoreIPC/win \
191 third_party/WebKit/Source/WebKit2/Platform/mac \
192 third_party/WebKit/Source/WebKit2/Platform/win \
193 third_party/WebKit/Source/WebKit2/PluginProcess/mac \
194 third_party/WebKit/Source/WebKit2/Shared/API/c/mac \
195 third_party/WebKit/Source/WebKit2/Shared/API/c/win \
196 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/mac \
197 third_party/WebKit/Source/WebKit2/Shared/Plugins/Netscape/win \
198 third_party/WebKit/Source/WebKit2/Shared/Plugins/mac \
199 third_party/WebKit/Source/WebKit2/Shared/cg/win \
200 third_party/WebKit/Source/WebKit2/Shared/mac \
201 third_party/WebKit/Source/WebKit2/Shared/win \
202 third_party/WebKit/Source/WebKit2/UIProcess/API/C/mac \
203 third_party/WebKit/Source/WebKit2/UIProcess/API/C/win \
204 third_party/WebKit/Source/WebKit2/UIProcess/API/mac \
205 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/mac \
206 third_party/WebKit/Source/WebKit2/UIProcess/Launcher/win \
207 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/mac \
208 third_party/WebKit/Source/WebKit2/UIProcess/Plugins/win \
209 third_party/WebKit/Source/WebKit2/UIProcess/mac \
210 third_party/WebKit/Source/WebKit2/UIProcess/win \
211 third_party/WebKit/Source/WebKit2/WebProcess/Authentication/mac \
212 third_party/WebKit/Source/WebKit2/WebProcess/Cookies/mac \
213 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/cf/win \
214 third_party/WebKit/Source/WebKit2/WebProcess/Downloads/mac \
215 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/mac \
216 third_party/WebKit/Source/WebKit2/WebProcess/FullScreen/win \
217 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/API/c/win \
218 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/mac \
219 third_party/WebKit/Source/WebKit2/WebProcess/InjectedBundle/win \
220 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/mac \
221 third_party/WebKit/Source/WebKit2/WebProcess/Plugins/Netscape/win \
222 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/mac \
223 third_party/WebKit/Source/WebKit2/WebProcess/WebCoreSupport/win \
224 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/mac \
225 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/ca/win \
226 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/mac \
227 third_party/WebKit/Source/WebKit2/WebProcess/WebPage/win \
228 third_party/WebKit/Source/WebKit2/WebProcess/mac \
229 third_party/WebKit/Source/WebKit2/WebProcess/win \
230 third_party/WebKit/Source/WebKit2/mac \
231 third_party/WebKit/Source/WebKit2/win \
232 third_party/WebKit/Tools/DumpRenderTree/mac \
233 third_party/WebKit/Tools/DumpRenderTree/win \
234 third_party/angle/samples/gles2_book \
237 third_party/bspatch \
238 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/external/client/android \
239 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/ticl/android \
240 third_party/cld/encodings/compact_lang_det/win_ \
241 third_party/cros_system_api_ \
242 third_party/ffmpeg/binaries \
243 third_party/ffmpeg/chromium/binaries/Chromium/win \
244 third_party/ffmpeg/chromium/config/Chrome/mac \
245 third_party/ffmpeg/chromium/config/Chrome/win \
246 third_party/ffmpeg/chromium/config/Chromium/mac \
247 third_party/ffmpeg/chromium/config/Chromium/win \
248 third_party/ffmpeg/chromium/include/win \
249 third_party/ffmpeg/doc \
250 third_party/fuzzymatch \
251 third_party/gles2_book \
252 third_party/gles_book_examples \
254 third_party/hunspell/dictionaries \
255 third_party/hunspell_dictionaries \
256 third_party/hyphen/doc \
257 third_party/icu/android \
258 third_party/icu/mac \
260 third_party/leveldatabase/src/doc \
261 third_party/leveldatabase/src/port/win \
262 third_party/libjpeg_turbo/mac \
263 third_party/libjpeg_turbo/win \
264 third_party/libva/va/android \
265 third_party/libvpx/source/config/mac \
266 third_party/libvpx/source/config/win \
267 third_party/libxml/mac \
268 third_party/lighttpd \
269 third_party/mesa/MesaLib/docs \
270 third_party/mesa/MesaLib/docs \
271 third_party/mesa/MesaLib/src/gallium/docs \
272 third_party/mozc/chrome/chromeos_ \
276 third_party/openssl/config/android \
277 third_party/pthread \
278 third_party/pyftpdlib \
279 third_party/re2/doc \
281 third_party/simplejson \
282 third_party/skia/include/utils/android \
283 third_party/skia/include/utils/ios \
284 third_party/skia/include/utils/mac \
285 third_party/skia/include/utils/win \
286 third_party/skia/include/views/android \
287 third_party/skia/src/gpu/gl/android \
288 third_party/skia/src/gpu/gl/mac \
289 third_party/skia/src/gpu/gl/win \
290 third_party/skia/src/utils/ios \
291 third_party/skia/src/utils/mac \
292 third_party/skia/src/utils/win \
293 third_party/skia/src/views/ios \
294 third_party/skia/src/views/mac \
295 third_party/skia/src/views/win \
296 third_party/snappy/mac \
297 third_party/sqlite/src/doc \
298 third_party/tcmalloc/vendor/doc \
299 third_party/tcmalloc_ \
301 third_party/webdriver/pylib/docs \
302 third_party/webrtc/modules/audio_device/android \
303 third_party/webrtc/modules/audio_device/ios \
304 third_party/webrtc/modules/audio_device/main/source/mac \
305 third_party/webrtc/modules/audio_device/main/source/win \
306 third_party/webrtc/modules/audio_device/win \
307 third_party/webrtc/modules/video_capture/main/source/android \
308 third_party/webrtc/modules/video_render/main/source/android \
309 third_party/webrtc/modules/video_render/main/source/mac \
310 third_party/webrtc/system_wrappers/source/android \
311 third_party/yasm/source/config/android \
312 third_party/yasm/source/config/mac \
313 third_party/yasm/source/config/win \
321 tools/wine_valgrind \
327 ui/resources/default_100_percent/cros_ \
328 ui/resources/default_200_percent/cros_ \
331 webkit/media/android \
338 # There are directories we want to strip, but that are unnecessarily required by the build-system
339 # So we drop everything but the gyp/gypi files
340 almost_strip_dirs() {
346 third_party/cros_dbus_cplusplus \
348 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' \) -print -delete || :
352 '!' -iname '*.gyp*' \
353 '!' -path 'tools/build/*' \
354 '!' -path 'tools/clang/scripts/plugin_flags.sh' \
355 '!' -path 'tools/generate_library_loader/*' \
356 '!' -path 'tools/generate_shim_headers/generate_shim_headers.py' \
357 '!' -path 'tools/generate_stubs/*' \
358 '!' -path 'tools/grit/*' \
359 '!' -path 'tools/gritsettings/*' \
360 '!' -path 'tools/gyp/*' \
361 '!' -path 'tools/json_comment_eater.py' \
362 '!' -path 'tools/json_schema_compiler/*' \
363 '!' -path 'tools/json_to_struct/*' \
364 '!' -path 'tools/protoc_wrapper/*' \
365 '!' -path 'tools/uuidgen.py' \
366 '!' -path 'tools/zip2msi.py' \
367 '!' -path 'tools/usb_ids/*' \
372 # list based from archlinux PKGBUILD
373 # https://aur.archlinux.org/packages/ch/chromium-dev/PKGBUILD
374 clean_third_party() {
375 find third_party -type f \! -iname '*.gyp*' \
376 \! -path 'third_party/WebKit/*' \
377 \! -path 'third_party/adobe/flash/*' \
378 \! -path 'third_party/angle/*' \
379 \! -path 'third_party/cacheinvalidation/*' \
380 \! -path 'third_party/cld/*' \
381 \! -path 'third_party/cros_system_api/*' \
382 \! -path 'third_party/ffmpeg/*' \
383 \! -path 'third_party/flac/flac.h' \
384 \! -path 'third_party/flot/*' \
385 \! -path 'third_party/harfbuzz-ng/*' \
386 \! -path 'third_party/harfbuzz/*' \
387 \! -path 'third_party/hunspell/*' \
388 \! -path 'third_party/hyphen/*' \
389 \! -path 'third_party/iccjpeg/*' \
390 \! -path 'third_party/khronos/*' \
391 \! -path 'third_party/leveldatabase/*' \
392 \! -path 'third_party/libXNVCtrl/*' \
393 \! -path 'third_party/libjingle/*' \
394 \! -path 'third_party/libphonenumber/*' \
395 \! -path 'third_party/libusb/libusb.h' \
396 \! -path 'third_party/libva/*' \
397 \! -path 'third_party/libvpx/libvpx.h' \
398 \! -path 'third_party/libxml/chromium/*' \
399 \! -path 'third_party/libyuv/*' \
400 \! -path 'third_party/lss/*' \
401 \! -path 'third_party/mesa/*' \
402 \! -path 'third_party/modp_b64/*' \
403 \! -path 'third_party/mt19937ar/*' \
404 \! -path 'third_party/npapi/*' \
405 \! -path 'third_party/opus/opus.h*' \
406 \! -path 'third_party/ots/*' \
407 \! -path 'third_party/protobuf/*' \
408 \! -path 'third_party/qcms/*' \
409 \! -path 'third_party/re2/*' \
410 \! -path 'third_party/sfntly/*' \
411 \! -path 'third_party/skia/*' \
412 \! -path 'third_party/smhasher/*' \
413 \! -path 'third_party/speex/speex.h' \
414 \! -path 'third_party/sqlite/*' \
415 \! -path 'third_party/tcmalloc/*' \
416 \! -path 'third_party/trace-viewer/*' \
417 \! -path 'third_party/undoview/*' \
418 \! -path 'third_party/v8-i18n/*' \
419 \! -path 'third_party/v8/*' \
420 \! -path 'third_party/webrtc/*' \
421 \! -path 'third_party/widevine/*' \
422 \! -path 'third_party/usb_ids/*' \
425 rm -vf third_party/expat/files/lib/expat.h
428 # parts based on ubuntu debian/rules
429 # http://bazaar.launchpad.net/~chromium-team/chromium-browser/chromium-browser.head/view/head:/debian/rules
438 \) -exec rm -fv {} \;
441 # removes dir, if the bcond is not turned off
442 strip_system_dirs() {
446 bcond=$(eval echo \$$lib)
447 [ "${bcond:-1}" = 0 ] && continue
449 # skip already removed dirs
450 test -d $dir || continue
452 find $dir -depth -mindepth 1 \! \( -name '*.gyp' -o -name '*.gypi' -o -path $dir/$lib.h \) -print -delete
456 # remove test data and files
457 # some scanned with find -name tests -o -name test -o -name test_data -o name testdata
458 # and find -iname *test*
466 breakpad/src/client/windows/tests \
467 breakpad/src/common/linux/tests \
468 breakpad/src/common/tests \
470 chrome/browser/chromeos/bluetooth/test \
471 chrome/browser/component_updater/test \
472 chrome/browser/extensions/api/test_ \
473 chrome/browser/printing/cloud_print/test \
474 chrome/browser/resources/gaia_auth/test \
475 chrome/browser/resources/tracing/tests \
476 chrome/browser/sync/test \
477 chrome/browser/ui/cocoa/test \
478 chrome/browser/ui/gtk/test \
479 chrome/browser/ui/tests \
480 chrome/browser/ui/views/test \
481 chrome/installer/test \
482 chrome/test/chromeos \
483 chrome/test/data/firefox2_nss_mac \
484 chrome/test/data/safe_browsing/old \
485 chrome/test/logging/win \
486 chrome/test/pyautolib/chromeos \
487 chrome/test/webdriver/test \
491 chrome_frame/tools/test \
492 content/browser/worker_host/test \
493 content/common/gpu/testdata \
494 content/public/test \
497 device/bluetooth/test \
499 gpu/command_buffer/tests \
501 media/tools/layout_tests/test_data \
502 native_client/buildbot \
503 native_client/src/shared/platform/testdata \
504 native_client/src/trusted/gio/testdata \
505 native_client/src/trusted/interval_multiset/testdata \
506 native_client/src/trusted/service_runtime/testdata \
507 native_client/src/trusted/validator/x86/decoder/generator/testdata \
508 native_client/src/trusted/validator/x86/testing \
509 native_client/src/trusted/validator_arm/testdata \
510 native_client/src/trusted/validator_mips/testdata \
511 native_client/src/trusted/validator_x86/testdata \
512 native_client/tests \
513 native_client/tools/testdata \
514 native_client/tools/tests \
515 native_client_sdk/src/build_tools/tests \
516 native_client_sdk/src/libraries/c_salt/test \
519 ppapi/native_client/tests \
523 sandbox/linux/seccomp-legacy/tests \
524 sandbox/linux/tests \
527 sdch/open-vcdiff/testdata \
528 seccompsandbox/tests \
529 sync/internal_api/public/test \
530 sync/internal_api/test \
533 testing/gmock/scripts/test \
535 testing/gtest/scripts/test \
537 third_party/WebKit/LayoutTests \
538 third_party/WebKit/Source/JavaScriptCore/API/tests \
539 third_party/WebKit/Source/JavaScriptCore/qt/tests \
540 third_party/WebKit/Source/JavaScriptCore/tests \
541 third_party/WebKit/Source/ThirdParty/gtest/scripts/test \
542 third_party/WebKit/Source/ThirdParty/gtest/test \
543 third_party/WebKit/Source/ThirdParty/gyp/test \
544 third_party/WebKit/Source/ThirdParty/qunit/test \
545 third_party/WebKit/Source/WebCore/bindings/scripts/test \
546 third_party/WebKit/Source/WebCore/testing_ \
547 third_party/WebKit/Source/WebKit/chromium/tests \
548 third_party/WebKit/Source/WebKit/efl/tests \
549 third_party/WebKit/Source/WebKit/gtk/tests \
550 third_party/WebKit/Source/WebKit/qt/tests \
551 third_party/WebKit/Source/WebKit2/UIProcess/API/efl/tests \
552 third_party/WebKit/Source/WebKit2/UIProcess/API/gtk/tests \
553 third_party/WebKit/Source/WebKit2/UIProcess/API/qt/tests \
554 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/mac \
555 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/Tests/win \
556 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/mac \
557 third_party/WebKit/Tools/DumpRenderTree/TestNetscapePlugIn/win \
558 third_party/WebKit/Tools/Scripts/webkitpy/test \
559 third_party/WebKit/Tools/TestWebKitAPI/Tests/TestWebKitAPI/mac \
560 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit/win \
561 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/mac \
562 third_party/WebKit/Tools/TestWebKitAPI/Tests/WebKit2/win \
563 third_party/WebKit/Tools/TestWebKitAPI/Tests/mac \
564 third_party/WebKit/Tools/TestWebKitAPI/mac \
565 third_party/WebKit/Tools/TestWebKitAPI/win \
566 third_party/angle/tests \
567 third_party/cacheinvalidation/files/src/google/cacheinvalidation/test \
568 third_party/cacheinvalidation/src/google/cacheinvalidation/test \
569 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing \
570 third_party/cacheinvalidation/src/java/com/google/ipc/invalidation/testing/android \
571 third_party/ffmpeg/tests \
572 third_party/harfbuzz/tests \
573 third_party/hunspell/tests \
574 third_party/hyphen/tests \
575 third_party/libexif/sources/test \
576 third_party/libjingle/source/talk/app/webrtc/test \
577 third_party/libjingle/source/talk/media/testdata \
578 third_party/libphonenumber/src/resources/test \
579 third_party/libphonenumber/src/test \
580 third_party/libsrtp/srtp/crypto/test \
581 third_party/libsrtp/srtp/test \
582 third_party/libyuv/unit_test/testdata \
583 third_party/mesa/MesaLib/src/gallium/tests \
584 third_party/openssl/openssl/crypto/des/t/test \
585 third_party/openssl/openssl/test \
586 third_party/ots/test \
587 third_party/protobuf/src/google/protobuf/testdata \
588 third_party/protobuf/src/google/protobuf/testing \
589 third_party/re2/re2/testing \
590 third_party/safe_browsing/testing \
591 third_party/sfntly/cpp/src/test \
592 third_party/sqlite/src/test \
593 third_party/sqlite/test \
594 third_party/talloc/libreplace/test \
595 third_party/tcmalloc/chromium/src/tests \
596 third_party/tcmalloc/vendor/src/tests \
597 third_party/tlslite/test \
598 third_party/trace-viewer/test_data \
599 third_party/trace-viewer/third_party/pywebsocket/src/test \
600 third_party/trace-viewer/third_party/pywebsocket/src/test/testdata \
601 third_party/v8-i18n/tests \
602 third_party/webdriver/pylib/test \
603 third_party/webdriver/test_data \
604 third_party/webrtc/modules/audio_device/test/android \
605 third_party/webrtc/modules/audio_processing/test/android \
606 third_party/webrtc/modules/utility/test \
607 third_party/webrtc/modules/video_capture/main/test/android \
608 third_party/webrtc/system_wrappers/test \
609 third_party/webrtc/test \
610 third_party/webrtc/test/testsupport/mac \
611 third_party/webrtc/video_engine/test/android \
612 third_party/webrtc/video_engine/test/auto_test/android \
613 third_party/webrtc/voice_engine/test/android \
614 third_party/xdg-utils/tests \
615 third_party/yasm/source/patched-yasm/libyasm/tests \
616 third_party/yasm/source/patched-yasm/modules/arch/lc3b/tests \
617 third_party/yasm/source/patched-yasm/modules/arch/x86/tests \
618 third_party/yasm/source/patched-yasm/modules/dbgfmts/dwarf2/tests \
619 third_party/yasm/source/patched-yasm/modules/dbgfmts/stabs/tests \
620 third_party/yasm/source/patched-yasm/modules/objfmts/bin/tests \
621 third_party/yasm/source/patched-yasm/modules/objfmts/coff/tests \
622 third_party/yasm/source/patched-yasm/modules/objfmts/elf/tests \
623 third_party/yasm/source/patched-yasm/modules/objfmts/macho/tests \
624 third_party/yasm/source/patched-yasm/modules/objfmts/rdf/tests \
625 third_party/yasm/source/patched-yasm/modules/objfmts/win32/tests \
626 third_party/yasm/source/patched-yasm/modules/objfmts/win64/tests \
627 third_party/yasm/source/patched-yasm/modules/objfmts/xdf/tests \
628 third_party/yasm/source/patched-yasm/modules/parsers/gas/tests \
629 third_party/yasm/source/patched-yasm/modules/parsers/nasm/tests \
630 third_party/yasm/source/patched-yasm/modules/parsers/tasm/tests \
631 third_party/yasm/source/patched-yasm/modules/preprocs/nasm/tests \
632 third_party/yasm/source/patched-yasm/modules/preprocs/raw/tests \
633 third_party/yasm/source/patched-yasm/tools/python-yasm/tests \
634 tools/clang/plugins/tests \
635 tools/grit/grit/testdata \
637 tools/gyp/tools/emacs/testdata \
638 tools/page_cycler/webpagereplay/tests \
639 tools/perf_expectations/tests \
640 tools/swarm_client/tests \
649 webkit/compositor_bindings/test \
650 webkit/data/layout_tests \
651 webkit/plugins/npapi/test \
652 webkit/tools/test/reference_build \
653 webkit/tools/test_shell/mac \
658 # partial remove (keep .gyp)
660 chrome/browser/nacl_host/test \
663 third_party/webrtc/modules/audio_coding/codecs/cng/test \
664 third_party/webrtc/modules/audio_coding/codecs/g711/test \
665 third_party/webrtc/modules/audio_coding/codecs/g722/test \
666 third_party/webrtc/modules/audio_coding/codecs/ilbc/test \
667 third_party/webrtc/modules/audio_coding/codecs/isac/fix/test \
668 third_party/webrtc/modules/audio_coding/codecs/isac/main/test \
669 third_party/webrtc/modules/audio_coding/main/test \
670 third_party/webrtc/modules/audio_coding/neteq/test \
671 third_party/webrtc/modules/audio_conference_mixer/test \
672 third_party/webrtc/modules/audio_device/test \
673 third_party/webrtc/modules/audio_processing/test \
674 third_party/webrtc/modules/rtp_rtcp/test \
675 third_party/webrtc/modules/udp_transport/test \
676 third_party/webrtc/modules/video_capture/main/test \
677 third_party/webrtc/modules/video_coding/codecs/test \
678 third_party/webrtc/modules/video_coding/codecs/vp8/test \
679 third_party/webrtc/modules/video_coding/main/test \
680 third_party/webrtc/modules/video_processing/main/test \
681 third_party/webrtc/modules/video_render/main/test \
682 third_party/webrtc/video_engine/test \
683 third_party/webrtc/voice_engine/test \
684 tools/json_schema_compiler/test \
686 find $dir -depth -mindepth 1 '!' '(' -name '*.gyp' -o -name '*.gypi' ')' -print -delete || :
689 # link headers from system dir. too many files to patch, we don't even build tests
690 install -d testing/gtest/include
691 ln -s /usr/include/gtest testing/gtest/include/gtest
693 # delete unittest files
694 find -name '*_unittest.*' \
698 remove_nonessential_dirs > REMOVED-nonessential_dirs.txt
699 almost_strip_dirs > REMOVED-stripped.txt
700 remove_bin_only > REMOVED-bin_only.txt
701 remove_tests > REMOVED-tests.txt
704 native_client/src/third_party_mod/jsoncpp \
708 third_party/jsoncpp \
709 third_party/libevent \
710 third_party/libexif \
711 third_party/libjpeg \
714 third_party/libsrtp \
717 third_party/libwebp \
718 third_party/libxml_ \
719 third_party/libxslt \
721 third_party/protobuf \
726 > REMOVED-system_dirs.txt
728 clean_third_party > REMOVED-third_party.txt
730 if [ "${v8:-1}" != "0" ]; then
731 # The implementation files include v8 headers with full path,
732 # like #include "v8/include/v8.h". Make sure the system headers
735 ln -s /usr/include v8/include
738 if [ "${nacl:-1}" != "0" ]; then
739 # NOTE: here is always x86_64
740 rm -rf native_client/toolchain/linux_x86_newlib
744 find -type d '!' -name '.' -print0 | sort -zr | xargs -0 rmdir --ignore-fail-on-non-empty > REMOVED-dirs.txt
746 # report what's in them
747 for a in REMOVED-*.txt; do