From aeac95192c106b41c058c8372aa2ec8d0092f60b Mon Sep 17 00:00:00 2001 From: Bruce Dawson Date: Sat, 12 Aug 2017 21:45:12 -0700 Subject: Fix use_system_freetype builds for FreeType changes FreeType has changed so it doesn't define ft_adobe_glyph_list once for every translation unit, which avoids wasting space in the data segment with duplicates. However Chromium builds with use_system_freetype true were depending on this behavior. This fixes these builds while avoiding duplicate arrays in other builds. This change makes no difference to pdfium itself, but is necessary when it is pulled in to Chromium. This is a follow-on to a previous change that fixed this issue for component builds. Change-Id: I3e68d7b778475e4a2781d77cd413e1bc22f82830 Reviewed-on: https://pdfium-review.googlesource.com/10830 Commit-Queue: Bruce Dawson Reviewed-by: Lei Zhang --- BUILD.gn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index cd2b0b05db..846e8a5ec8 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2,6 +2,7 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/config/freetype/freetype.gni") import("//testing/test.gni") import("pdfium.gni") @@ -1070,9 +1071,9 @@ static_library("fxge") { ] defines = [ "DEFINE_PS_TABLES" ] - if (is_component_build) { + if (is_component_build || use_system_freetype) { # ft_adobe_glyph_list is not exported from the Freetype shared library so we - # need it defined in component builds. + # need it defined in component builds and builds using system freetype. defines += [ "DEFINE_PS_TABLES_DATA" ] } -- cgit v1.2.3