| Index: third_party/harfbuzz-ng/BUILD.gn
|
| diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
|
| index 7f5b2e3f5757a0de1ba525d0ac2ef97cc93c414d..195c5c81c806c752b196ecbe685fc2381a485e93 100644
|
| --- a/third_party/harfbuzz-ng/BUILD.gn
|
| +++ b/third_party/harfbuzz-ng/BUILD.gn
|
| @@ -2,6 +2,8 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import("//build/config/linux/pkg_config.gni")
|
| +
|
| # The GYP build supports system harfbuzz for non-official builds when using
|
| # pangoft2 1.31.0 or greater (which pulls it in).
|
| # TODO(brettw) we can consider doing this as well, although the benefit is
|
| @@ -11,7 +13,28 @@
|
| # don't want to bloat the binary more by including another copy.
|
|
|
| declare_args() {
|
| - use_system_harfbuzz = is_chromeos
|
| + if (is_chromeos) {
|
| + # ChromeOS includes an up-to-date system harfbuzz that we have control
|
| + # over, so it use the system one by default.
|
| + use_system_harfbuzz = true
|
| + } else if (is_official_build) {
|
| + # For official builds, we want to control the Harbuzz version so always
|
| + # use our included one. Currently the sysroot includes a version of pangoft
|
| + # that doesn't link to harfbuzz, so there are no linker problems. If we
|
| + # update that version, we'll need to work around the duplicate symbols some
|
| + # other way.
|
| + use_system_harfbuzz = false
|
| + } else if (is_linux) {
|
| + # Use the system harfbuzz for newer versions of pangoft, and not for older
|
| + # ones. pangoft links to the system harfbuzz starting with 1.31.0, which
|
| + # causes duplicate symbols when we link our own version.
|
| + use_system_harfbuzz = exec_script(
|
| + pkg_config_script,
|
| + pkg_config_args + [ "--atleast-version=1.31.0", "pangoft2" ],
|
| + "value")
|
| + } else {
|
| + use_system_harfbuzz = false
|
| + }
|
| }
|
|
|
| if (use_system_harfbuzz) {
|
| @@ -28,7 +51,7 @@ if (use_system_harfbuzz) {
|
| include_dirs = [ "src" ]
|
| }
|
|
|
| - source_set("harfbuzz-ng") {
|
| + static_library("harfbuzz-ng") {
|
| sources = [
|
| "src/hb-atomic-private.hh",
|
| "src/hb-blob.cc",
|
|
|