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

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

Issue 2871133004: Build FreeType with HarfBuzz support (Closed)
Patch Set: Rebaseline expectation Created 3 years, 7 months 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
Index: third_party/harfbuzz-ng/BUILD.gn
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn
index b3dcc3d46051c30a47855d0bc2279132f22349a1..7226d01ad1f69c5b50ca9282d813d75dff26d5ed 100644
--- a/third_party/harfbuzz-ng/BUILD.gn
+++ b/third_party/harfbuzz-ng/BUILD.gn
@@ -7,15 +7,7 @@ import("//build/config/features.gni")
import("//build/config/linux/pkg_config.gni")
import("//build/config/ui.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
-
-declare_args() {
- # Blink uses a cutting-edge version of Harfbuzz; most Linux distros do not
- # contain a new enough version of the code to work correctly. However,
- # ChromeOS chroots (i.e, real ChromeOS builds for devices) do contain a
- # new enough version of the library, and so this variable exists so that
- # ChromeOS can build against the system lib and keep binary sizes smaller.
- use_system_harfbuzz = false
-}
+import("//third_party/harfbuzz-ng/harfbuzz.gni")
if (use_system_harfbuzz) {
import("//build/config/linux/pkg_config.gni")
@@ -50,8 +42,7 @@ if (use_system_harfbuzz) {
# See also chrome/browser/ui/libgtkui/BUILD.gn which pulls this.
config("pangoft2_link_hack") {
- if (is_linux && use_pango && !is_chromeos && !is_official_build &&
- current_cpu != "arm" && current_cpu != "mipsel" && !is_component_build) {
+ if (is_linux && use_pango && !use_system_harfbuzz && !is_component_build) {
# These symbols are referenced from libpangoft2, which will be
# dynamically linked later.
ldflags = [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ]
@@ -198,20 +189,6 @@ if (use_system_harfbuzz) {
]
}
- # When without -fvisibility=hidden for pango to use the harfbuzz
- # in the tree, all symbols pango needs must be included, or
- # pango uses mixed versions of harfbuzz and leads to crash.
- # See crbug.com/462689.
- if (is_linux && use_pango && !is_chromeos && !is_official_build &&
- current_cpu != "arm" && current_cpu != "mipsel") {
- deps += [ "//build/config/freetype" ]
- configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
- configs += [ "//build/config/gcc:symbol_visibility_default" ]
- sources += [
- "src/hb-ft.cc",
- "src/hb-ft.h",
- ]
- }
if (use_glib) {
configs += [ "//build/config/linux:glib" ]
sources += [
@@ -220,6 +197,39 @@ if (use_system_harfbuzz) {
]
}
}
+
+ static_library("harfbuzz-ng-ft") {
+ sources = [
+ "src/hb-ft.cc",
+ "src/hb-ft.h",
+ ]
+
+ if (is_component_build && !is_win) {
+ configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+ configs += [ "//build/config/gcc:symbol_visibility_default" ]
+ }
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+
+ # Must be after no_chromium_code for warning flags to be ordered
+ # correctly.
+ ":harfbuzz_warnings",
+ ]
+ public_configs = [ ":harfbuzz-ng_config" ]
+
+ defines = [
+ "HAVE_OT",
+ "HAVE_ICU",
+ "HAVE_ICU_BUILTIN",
+ "HB_NO_MT",
+ ]
+
+ deps = [
+ "//third_party/freetype:bootstrap_freetype_for_harfbuzz",
+ ]
+ }
}
fuzzer_test("harfbuzz_fuzzer") {
« no previous file with comments | « third_party/freetype/include/freetype-custom-config/ftoption.h ('k') | third_party/harfbuzz-ng/harfbuzz.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698