Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(272)

Unified Diff: third_party/harfbuzz-ng/BUILD.gn

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm ('k') | third_party/libxml/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
« no previous file with comments | « third_party/boringssl/win-x86_64/crypto/aes/aesni-x86_64.asm ('k') | third_party/libxml/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698