README (2416B)
1 This directory contains files that make it possible for Linux 2 distributions to build Chromium using system libraries and exclude the 3 source code for Chromium's bundled copies of system libraries in a 4 consistent manner. Nothing here is used in normal developer builds. 5 6 7 For more info on the Linux distros' philosophy on bundling system 8 libraries and why this exists, please read the following: 9 10 - https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries 11 - https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies 12 - http://www.debian.org/doc/debian-policy/ch-source.html#s-embeddedfiles 13 14 For more Chromium-specific context please read 15 http://spot.livejournal.com/312320.html . 16 17 Additional resources which might provide even more context: 18 19 - http://events.linuxfoundation.org/sites/events/files/slides/LinuxCon%202014%20Slides_0.pdf 20 - https://lwn.net/Articles/619158/ 21 22 23 This directory is provided in the source tree so one can follow the 24 above guidelines without having to download additional tools and worry 25 about having the right version of the tool. It is a compromise solution 26 which takes into account Chromium developers who want to avoid the 27 perceived burden of more conditional code in build files, and 28 expectations of Open Source community, where using system-provided 29 libraries is the norm. 30 31 Usage: 32 33 1. remove_bundled_libraries.py <preserved-directories> 34 35 For example: remove_bundled_libraries.py third_party/zlib 36 37 The script scans sources looking for third_party directories. 38 Everything that is not explicitly preserved is removed (except for 39 GYP/GN build files), and the script fails if any directory passed on 40 command line does not exist (to ensure list is kept up to date). 41 42 This is intended to be used on source code extracted from a tarball, 43 not on a git repository. 44 45 NOTE: by default this will not remove anything (for safety). Pass 46 the --do-remove flag to actually remove files. 47 48 2. replace_gn_files.py --system-libraries lib... 49 50 This swaps out a normal library GN build file that is intended for 51 use with a bundled library for a build file that is set up to use 52 the system library. While some build files have use_system_libfoo 53 build flags, using unbundled build files has the advantage that Linux 54 distros can build Chromium without having to specify many additional 55 build flags. 56 57 For example: replace_gn_files.py --system-libraries libxml