README 2.4 KB

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