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

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

Issue 702903004: Add chrome perf tests and sniffer to GN build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 | « remoting/resources/BUILD.gn ('k') | no next file » | 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..d48eb08d572c632a0ee433a0c1090bd12bd088cb 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,26 @@
# 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.
Dirk Pranke 2014/11/08 01:27:13 you probably already realize this, but if you buil
+ 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 {
+ # 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")
+ }
}
if (use_system_harfbuzz) {
@@ -28,7 +49,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 | « remoting/resources/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698