OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
6 import("//build/config/linux/pkg_config.gni") | 6 import("//build/config/linux/pkg_config.gni") |
7 import("//build/config/ui.gni") | 7 import("//build/config/ui.gni") |
8 | 8 |
9 # The GYP build supports system harfbuzz for non-official builds when using | 9 # The GYP build supports system harfbuzz for non-official builds when using |
10 # pangoft2 1.31.0 or greater (which pulls it in). | 10 # pangoft2 1.31.0 or greater (which pulls it in). |
(...skipping 23 matching lines...) Expand all Loading... |
34 packages = [ "harfbuzz" ] | 34 packages = [ "harfbuzz" ] |
35 } | 35 } |
36 group("harfbuzz-ng") { | 36 group("harfbuzz-ng") { |
37 public_configs = [ ":harfbuzz_pkgconfig" ] | 37 public_configs = [ ":harfbuzz_pkgconfig" ] |
38 } | 38 } |
39 } else { | 39 } else { |
40 config("harfbuzz-ng_config") { | 40 config("harfbuzz-ng_config") { |
41 include_dirs = [ "src" ] | 41 include_dirs = [ "src" ] |
42 } | 42 } |
43 | 43 |
44 config("harfbuzz_warnings") { | |
45 cflags = [] | |
46 if (is_clang) { | |
47 cflags += [ | |
48 "-Wno-unused-value", | |
49 | |
50 # Harfbuzz uses unused typedefs for its static asserts (and its | |
51 # static asserts are strange enough that they can't be replaced | |
52 # by static_assert). | |
53 "-Wno-unused-local-typedef", | |
54 ] | |
55 } | |
56 if (is_win) { | |
57 # Result of 32-bit shift implicitly converted to 64 bits. | |
58 cflags += [ "/wd4334" ] | |
59 } | |
60 } | |
61 | |
62 # See also chrome/browser/ui/libgtk2ui/BUILD.gn which pulls this. | |
63 config("pangoft2_link_hack") { | |
64 if (is_linux && use_pango && !is_chromeos && !is_official_build && | |
65 current_cpu != "arm" && current_cpu != "mipsel" && | |
66 !is_component_build) { | |
67 # These symbols are referenced from libpangoft2, which will be | |
68 # dynamically linked later. | |
69 ldflags = | |
70 [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] | |
71 } | |
72 } | |
73 | |
74 static_library("harfbuzz-ng") { | 44 static_library("harfbuzz-ng") { |
75 sources = [ | 45 sources = [ |
76 "src/hb-atomic-private.hh", | 46 "src/hb-atomic-private.hh", |
77 "src/hb-blob.cc", | 47 "src/hb-blob.cc", |
78 "src/hb-blob.h", | 48 "src/hb-blob.h", |
79 "src/hb-buffer-deserialize-json.hh", | 49 "src/hb-buffer-deserialize-json.hh", |
80 "src/hb-buffer-deserialize-text.hh", | 50 "src/hb-buffer-deserialize-text.hh", |
81 "src/hb-buffer-private.hh", | 51 "src/hb-buffer-private.hh", |
82 "src/hb-buffer-serialize.cc", | 52 "src/hb-buffer-serialize.cc", |
83 "src/hb-buffer.cc", | 53 "src/hb-buffer.cc", |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 ] | 139 ] |
170 | 140 |
171 defines = [ | 141 defines = [ |
172 "HAVE_OT", | 142 "HAVE_OT", |
173 "HAVE_ICU", | 143 "HAVE_ICU", |
174 "HAVE_ICU_BUILTIN", | 144 "HAVE_ICU_BUILTIN", |
175 "HB_NO_MT", | 145 "HB_NO_MT", |
176 ] | 146 ] |
177 | 147 |
178 configs -= [ "//build/config/compiler:chromium_code" ] | 148 configs -= [ "//build/config/compiler:chromium_code" ] |
179 configs += [ | 149 configs += [ "//build/config/compiler:no_chromium_code" ] |
180 ":harfbuzz_warnings", | 150 |
181 "//build/config/compiler:no_chromium_code", | 151 config("harfbuzz_warnings") { |
182 ] | 152 cflags = [] |
| 153 if (is_clang) { |
| 154 cflags += [ |
| 155 "-Wno-unused-value", |
| 156 |
| 157 # Harfbuzz uses unused typedefs for its static asserts (and its |
| 158 # static asserts are strange enough that they can't be replaced |
| 159 # by static_assert). |
| 160 "-Wno-unused-local-typedef", |
| 161 ] |
| 162 } |
| 163 if (is_win) { |
| 164 cflags += [ "/wd4334" ] # Result of 32-bit shift implicitly converted t
o 64 bits. |
| 165 } |
| 166 } |
| 167 configs += [ ":harfbuzz_warnings" ] |
| 168 |
183 public_configs = [ ":harfbuzz-ng_config" ] | 169 public_configs = [ ":harfbuzz-ng_config" ] |
184 | 170 |
185 deps = [ | 171 deps = [ |
186 "//third_party/icu:icuuc", | 172 "//third_party/icu:icuuc", |
187 ] | 173 ] |
188 | 174 |
189 if (is_mac) { | 175 if (is_mac) { |
190 sources += [ | 176 sources += [ |
191 "src/hb-coretext.cc", | 177 "src/hb-coretext.cc", |
192 "src/hb-coretext.h", | 178 "src/hb-coretext.h", |
(...skipping 13 matching lines...) Expand all Loading... |
206 "//build/config/linux:glib", | 192 "//build/config/linux:glib", |
207 ] | 193 ] |
208 sources += [ | 194 sources += [ |
209 "src/hb-ft.cc", | 195 "src/hb-ft.cc", |
210 "src/hb-ft.h", | 196 "src/hb-ft.h", |
211 "src/hb-glib.cc", | 197 "src/hb-glib.cc", |
212 "src/hb-glib.h", | 198 "src/hb-glib.h", |
213 ] | 199 ] |
214 } | 200 } |
215 | 201 |
| 202 # See also chrome/browser/ui/libgtk2ui/BUILD.gn which pulls this. |
| 203 config("pangoft2_link_hack") { |
| 204 if (is_linux && use_pango && !is_chromeos && !is_official_build && |
| 205 current_cpu != "arm" && current_cpu != "mipsel" && |
| 206 !is_component_build) { |
| 207 # These symbols are referenced from libpangoft2, which will be |
| 208 # dynamically linked later. |
| 209 ldflags = |
| 210 [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] |
| 211 } |
| 212 } |
216 } | 213 } |
217 } | 214 } |
OLD | NEW |