chromium-src-build/linux/unbundle
Evangelos Foutras c1eaca3570 Fix crash in is_cfi=true builds with unbundled ICU
Ensure ICU symbols have public visibility and are thus excluded from CFI
checks and whole-program optimization. The former caused a startup crash
and the latter has the potential to break virtual calls in weird ways.

BUG=822820

Change-Id: Ia809eefcb9e93b3c612f2381d394db83bbc67120
Reviewed-on: https://chromium-review.googlesource.com/978008
Reviewed-by: Peter Collingbourne <pcc@chromium.org>
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#545638}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f15e8b573ada0fcd643ae393484214b1c7c940f8
2018-03-24 00:04:33 +00:00
..
README Update build/linux/unbundle/README 2017-03-31 19:44:05 +00:00
ffmpeg.gn reland: Rename buildflag_headers for consistency 2018-02-23 21:29:23 +00:00
flac.gn unbundle: add GN files for flac, harfbuzz-ng, and libwebp 2016-05-11 08:36:07 +00:00
fontconfig.gn Reland "Statically link fontconfig on Linux" 2017-12-22 06:20:09 +00:00
freetype.gn Fix freetype unbundle 2017-12-16 00:19:13 +00:00
harfbuzz-ng.gn Fix harfbuzz unbundle 2017-12-22 02:40:20 +00:00
icu.gn Fix crash in is_cfi=true builds with unbundled ICU 2018-03-24 00:04:33 +00:00
libdrm.gn Unbundle libdrm 2017-03-30 14:31:51 +00:00
libevent.gn unbundle: add GN files for ffmpeg, libevent, libxslt, snappy, and yasm 2016-05-12 08:21:36 +00:00
libjpeg.gn Fix and simplify libjpeg unbundle 2018-03-22 22:30:59 +00:00
libpng.gn Fix build with system libpng 2017-05-17 19:27:53 +00:00
libvpx.gn unbundle: add GN files for libpng, libvpx, and re2 2016-07-05 16:01:52 +00:00
libwebp.gn Fix libwebp unbundle 2018-01-25 00:08:13 +00:00
libxml.gn unbundle: add replace_gn_files.py and unbundled GN file for libxml 2016-04-06 09:17:56 +00:00
libxslt.gn unbundle: add GN files for ffmpeg, libevent, libxslt, snappy, and yasm 2016-05-12 08:21:36 +00:00
openh264.gn Unbundle openh264 2017-05-22 12:52:46 +00:00
opus.gn Fix build with system opus 2017-05-15 19:58:25 +00:00
re2.gn unbundle: add GN files for libpng, libvpx, and re2 2016-07-05 16:01:52 +00:00
remove_bundled_libraries.py
replace_gn_files.py Fix and simplify libjpeg unbundle 2018-03-22 22:30:59 +00:00
snappy.gn unbundle: add GN files for ffmpeg, libevent, libxslt, snappy, and yasm 2016-05-12 08:21:36 +00:00
yasm.gn Shrink chrome_elf.dll by switching source_sets to static_library 2016-07-01 17:57:31 +00:00
zlib.gn unbundle: fix build with system zlib 2016-07-07 10:54:26 +00:00

README

This directory contains files that make it possible for Linux
distributions to build Chromium using system libraries and exclude the
source code for Chromium's bundled copies of system libraries in a
consistent manner. Nothing here is used in normal developer builds.


For more info on the Linux distros' philosophy on bundling system
libraries and why this exists, please read the following:

 - https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries
 - https://wiki.gentoo.org/wiki/Why_not_bundle_dependencies
 - http://www.debian.org/doc/debian-policy/ch-source.html#s-embeddedfiles

For more Chromium-specific context please read
http://spot.livejournal.com/312320.html .

Additional resources which might provide even more context:

  - http://events.linuxfoundation.org/sites/events/files/slides/LinuxCon%202014%20Slides_0.pdf
  - https://lwn.net/Articles/619158/


This directory is provided in the source tree so one can follow the
above guidelines without having to download additional tools and worry
about having the right version of the tool. It is a compromise solution
which takes into account Chromium developers who want to avoid the
perceived burden of more conditional code in build files, and
expectations of Open Source community, where using system-provided
libraries is the norm.

Usage:

1. remove_bundled_libraries.py <preserved-directories>

   For example: remove_bundled_libraries.py third_party/mesa

   The script scans sources looking for third_party directories.
   Everything that is not explicitly preserved is removed (except for
   GYP/GN build files), and the script fails if any directory passed on
   command line does not exist (to ensure list is kept up to date).

   This is intended to be used on source code extracted from a tarball,
   not on a git repository.

   NOTE: by default this will not remove anything (for safety). Pass
   the --do-remove flag to actually remove files.

2. replace_gn_files.py --system-libraries lib...

   This swaps out a normal library GN build file that is intended for
   use with a bundled library for a build file that is set up to use
   the system library. While some build files have use_system_libfoo
   build flags, using unbundled build files has the advantage that Linux
   distros can build Chromium without having to specify many additional
   build flags.

   For example: replace_gn_files.py --system-libraries libxml