Index: third_party/harfbuzz-ng/BUILD.gn |
diff --git a/third_party/harfbuzz-ng/BUILD.gn b/third_party/harfbuzz-ng/BUILD.gn |
index 144130af1cab79d01df6bdfda2770fd898cc1c4a..29573fed38138311289f10e1e193819e611e2d87 100644 |
--- a/third_party/harfbuzz-ng/BUILD.gn |
+++ b/third_party/harfbuzz-ng/BUILD.gn |
@@ -41,6 +41,36 @@ if (use_system_harfbuzz) { |
include_dirs = [ "src" ] |
} |
+ config("harfbuzz_warnings") { |
+ cflags = [] |
+ if (is_clang) { |
+ cflags += [ |
+ "-Wno-unused-value", |
+ |
+ # Harfbuzz uses unused typedefs for its static asserts (and its |
+ # static asserts are strange enough that they can't be replaced |
+ # by static_assert). |
+ "-Wno-unused-local-typedef", |
+ ] |
+ } |
+ if (is_win) { |
+ # Result of 32-bit shift implicitly converted to 64 bits. |
+ cflags += [ "/wd4334" ] |
+ } |
+ } |
+ |
+ # See also chrome/browser/ui/libgtk2ui/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) { |
+ # These symbols are referenced from libpangoft2, which will be |
+ # dynamically linked later. |
+ ldflags = |
+ [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] |
+ } |
+ } |
+ |
static_library("harfbuzz-ng") { |
sources = [ |
"src/hb-atomic-private.hh", |
@@ -146,26 +176,10 @@ if (use_system_harfbuzz) { |
] |
configs -= [ "//build/config/compiler:chromium_code" ] |
- configs += [ "//build/config/compiler:no_chromium_code" ] |
- |
- config("harfbuzz_warnings") { |
- cflags = [] |
- if (is_clang) { |
- cflags += [ |
- "-Wno-unused-value", |
- |
- # Harfbuzz uses unused typedefs for its static asserts (and its |
- # static asserts are strange enough that they can't be replaced |
- # by static_assert). |
- "-Wno-unused-local-typedef", |
- ] |
- } |
- if (is_win) { |
- cflags += [ "/wd4334" ] # Result of 32-bit shift implicitly converted to 64 bits. |
- } |
- } |
- configs += [ ":harfbuzz_warnings" ] |
- |
+ configs += [ |
+ ":harfbuzz_warnings", |
Nico
2015/09/01 18:27:47
Not lgtm, this breaks things. ":harfbuzz_warnings"
Dirk Pranke
2015/09/01 18:38:38
I'm guessing that if we change this to:
configs -
Nico
2015/09/01 18:42:00
Yes.
(FWIW, the "usually with the assumption that
|
+ "//build/config/compiler:no_chromium_code", |
+ ] |
public_configs = [ ":harfbuzz-ng_config" ] |
deps = [ |
@@ -199,16 +213,5 @@ if (use_system_harfbuzz) { |
] |
} |
- # See also chrome/browser/ui/libgtk2ui/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) { |
- # These symbols are referenced from libpangoft2, which will be |
- # dynamically linked later. |
- ldflags = |
- [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] |
- } |
- } |
} |
} |