Commit 4f1a6055 authored by Tom Anderson's avatar Tom Anderson Committed by Commit Bot

Statically link fontconfig on Linux

This CL switches Linux to use in-tree fontconfig builds.  It exposes some leaks
and races detected by LSAN and TSAN.  For now, these will be suppressed since
these issues were preexisting, but instrumenting fontconfig exposed the issues.

R=dnicoara@chromium.org,dpranke@chromium.org
BUG=795110,795148

Change-Id: Ia75db4ced6ec78a5f0610af9ebc78a87840b86f7
Reviewed-on: https://chromium-review.googlesource.com/826403
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Reviewed-by: default avatarDaniel Nicoara <dnicoara@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524389}
parent 53096ba1
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
assert(is_linux)
config("fontconfig_config") {
libs = [ "fontconfig" ]
}
group("fontconfig") {
public_configs = [ ":fontconfig_config" ]
}
......@@ -19,6 +19,7 @@ import sys
REPLACEMENTS = {
'ffmpeg': 'third_party/ffmpeg/BUILD.gn',
'flac': 'third_party/flac/BUILD.gn',
'fontconfig': 'third_party/fontconfig/BUILD.gn',
'freetype': 'third_party/freetype/BUILD.gn',
'harfbuzz-ng': 'third_party/harfbuzz-ng/BUILD.gn',
'icu': 'third_party/icu/BUILD.gn',
......
......@@ -94,6 +94,9 @@ char kLSanDefaultSuppressions[] =
"leak:blink::DOMWrapperWorld::Create\n"
"leak:blink::ScriptState::Create\n"
// https://crbug.com/795148
"leak:third_party/fontconfig/\n"
// PLEASE READ ABOVE BEFORE ADDING NEW SUPPRESSIONS.
// End of suppressions.
......
......@@ -251,6 +251,9 @@ char kTSanDefaultSuppressions[] =
"race:base::i18n::IsRTL\n"
"race:base::i18n::SetICUDefaultLocale\n"
// http://crbug.com/795110
"race:third_party/fontconfig/*\n"
//
"race:third_party/harfbuzz-ng/src/*\n"
......
......@@ -8,7 +8,6 @@
"libcups2": "2.2.6-2",
"libdbus-1-3": "1.12.2-1",
"libexpat1": "2.2.3-2",
"libfontconfig1": "2.12.6-0.1",
"libgcc1": "1:7.2.0-17",
"libgdk-pixbuf2.0-0": "2.36.11-1",
"libglib2.0-0": "2.54.1-1",
......@@ -41,7 +40,6 @@
"libcups2": "1.7.5-11+deb8u1",
"libdbus-1-3": "1.8.22-0+deb8u1",
"libexpat1": "2.1.0-6+deb8u4",
"libfontconfig1": "2.11.0-6.3+deb8u1",
"libgcc1": "1:4.9.2-10",
"libgdk-pixbuf2.0-0": "2.31.1-2+deb8u6",
"libglib2.0-0": "2.42.1-1+b1",
......@@ -74,7 +72,6 @@
"libcups2": "2.2.1-8",
"libdbus-1-3": "1.10.24-0+deb9u1",
"libexpat1": "2.2.0-2+deb9u1",
"libfontconfig1": "2.11.0-6.7+b1",
"libgcc1": "1:6.3.0-18",
"libgdk-pixbuf2.0-0": "2.36.5-2+deb9u1",
"libglib2.0-0": "2.50.3-2",
......@@ -107,7 +104,6 @@
"libcups2": "1.7.2-0ubuntu1.7",
"libdbus-1-3": "1.6.18-0ubuntu4.4",
"libexpat1": "2.1.0-4ubuntu1.4",
"libfontconfig1": "2.11.0-0ubuntu4.2",
"libgcc1": "1:4.9.3-0ubuntu4",
"libgdk-pixbuf2.0-0": "2.30.7-0ubuntu1.7",
"libglib2.0-0": "2.40.2-0ubuntu1",
......@@ -140,7 +136,6 @@
"libcups2": "2.1.3-4ubuntu0.3",
"libdbus-1-3": "1.10.6-1ubuntu3.1",
"libexpat1": "2.1.0-7ubuntu0.16.04.3",
"libfontconfig1": "2.11.94-0ubuntu1.1",
"libgcc1": "1:6.0.1-0ubuntu1",
"libgdk-pixbuf2.0-0": "2.32.2-1ubuntu1.3",
"libglib2.0-0": "2.48.2-0ubuntu1",
......@@ -173,7 +168,6 @@
"libcups2": "2.2.2-1ubuntu1",
"libdbus-1-3": "1.10.10-1ubuntu2",
"libexpat1": "2.2.0-2ubuntu0.1",
"libfontconfig1": "2.11.94-0ubuntu2",
"libgcc1": "1:6.3.0-12ubuntu2",
"libgdk-pixbuf2.0-0": "2.36.5-3ubuntu0.2",
"libglib2.0-0": "2.52.0-1",
......@@ -206,7 +200,6 @@
"libcups2": "2.2.4-7ubuntu3",
"libdbus-1-3": "1.10.22-1ubuntu1",
"libexpat1": "2.2.3-1",
"libfontconfig1": "2.11.94-0ubuntu2",
"libgcc1": "1:7.2.0-8ubuntu3",
"libgdk-pixbuf2.0-0": "2.36.11-1",
"libglib2.0-0": "2.54.1-1ubuntu1",
......
......@@ -43,7 +43,6 @@ PACKAGE_FILTER = set([
"libcups2",
"libdbus-1-3",
"libexpat1",
"libfontconfig1",
"libgcc1",
"libgdk-pixbuf2.0-0",
"libglib2.0-0",
......
......@@ -63,7 +63,6 @@
"libdl.so.2(GLIBC_2.3.4)(64bit)",
"libexpat.so.0()(64bit)",
"libexpat.so.1()(64bit)",
"libfontconfig.so.1()(64bit)",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)(64bit)",
"libgcc_s.so.1(GCC_3.3)(64bit)",
......@@ -303,7 +302,6 @@
"libdl.so.2(GLIBC_2.3.4)(64bit)",
"libexpat.so.0()(64bit)",
"libexpat.so.1()(64bit)",
"libfontconfig.so.1()(64bit)",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)(64bit)",
"libgcc_s.so.1(GCC_3.3)(64bit)",
......@@ -548,7 +546,6 @@
"libdl.so.2(GLIBC_2.3.3)(64bit)",
"libdl.so.2(GLIBC_2.3.4)(64bit)",
"libexpat.so.1()(64bit)",
"libfontconfig.so.1()(64bit)",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)(64bit)",
"libgcc_s.so.1(GCC_3.3)(64bit)",
......@@ -856,8 +853,6 @@
"libexpat.so.0()(64bit)",
"libexpat.so.1",
"libexpat.so.1()(64bit)",
"libfontconfig.so.1",
"libfontconfig.so.1()(64bit)",
"libgcc_s.so.1",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)",
......@@ -1307,8 +1302,6 @@
"libexpat.so.0()(64bit)",
"libexpat.so.1",
"libexpat.so.1()(64bit)",
"libfontconfig.so.1",
"libfontconfig.so.1()(64bit)",
"libgcc_s.so.1",
"libgcc_s.so.1()(64bit)",
"libgcc_s.so.1(GCC_3.0)",
......
......@@ -35,7 +35,6 @@ PACKAGE_FILTER = [
"libdbus-1.so",
"libdl.so",
"libexpat.so",
"libfontconfig.so",
"libgcc_s.so",
"libgdk-3.so",
"libgdk_pixbuf-2.0.so",
......
......@@ -55,6 +55,13 @@ if (use_bundled_fontconfig) {
"FONTCONFIG_PATH=\"/etc/fonts\"",
]
# This is a hack to remove visibility("default") annotations. Fontconfig
# symbols should not be exported from chrome, nacl_helper, or anything
# else.
if (!is_component_build) {
defines += [ "visibility(x)=" ]
}
deps = [
"//build/config/freetype",
"//third_party/libxml",
......
......@@ -7,5 +7,5 @@ import("//build/config/features.gni")
assert(is_linux)
declare_args() {
use_bundled_fontconfig = is_chromecast
use_bundled_fontconfig = is_chromecast || is_desktop_linux
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment