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 |
44 static_library("harfbuzz-ng") { | 74 static_library("harfbuzz-ng") { |
45 sources = [ | 75 sources = [ |
46 "src/hb-atomic-private.hh", | 76 "src/hb-atomic-private.hh", |
47 "src/hb-blob.cc", | 77 "src/hb-blob.cc", |
48 "src/hb-blob.h", | 78 "src/hb-blob.h", |
49 "src/hb-buffer-deserialize-json.hh", | 79 "src/hb-buffer-deserialize-json.hh", |
50 "src/hb-buffer-deserialize-text.hh", | 80 "src/hb-buffer-deserialize-text.hh", |
51 "src/hb-buffer-private.hh", | 81 "src/hb-buffer-private.hh", |
52 "src/hb-buffer-serialize.cc", | 82 "src/hb-buffer-serialize.cc", |
53 "src/hb-buffer.cc", | 83 "src/hb-buffer.cc", |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 ] | 169 ] |
140 | 170 |
141 defines = [ | 171 defines = [ |
142 "HAVE_OT", | 172 "HAVE_OT", |
143 "HAVE_ICU", | 173 "HAVE_ICU", |
144 "HAVE_ICU_BUILTIN", | 174 "HAVE_ICU_BUILTIN", |
145 "HB_NO_MT", | 175 "HB_NO_MT", |
146 ] | 176 ] |
147 | 177 |
148 configs -= [ "//build/config/compiler:chromium_code" ] | 178 configs -= [ "//build/config/compiler:chromium_code" ] |
149 configs += [ "//build/config/compiler:no_chromium_code" ] | 179 configs += [ |
| 180 "//build/config/compiler:no_chromium_code", |
150 | 181 |
151 config("harfbuzz_warnings") { | 182 # Must be after no_chromium_code for warning flags to be ordered |
152 cflags = [] | 183 # correctly. |
153 if (is_clang) { | 184 ":harfbuzz_warnings", |
154 cflags += [ | 185 ] |
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 | |
169 public_configs = [ ":harfbuzz-ng_config" ] | 186 public_configs = [ ":harfbuzz-ng_config" ] |
170 | 187 |
171 deps = [ | 188 deps = [ |
172 "//third_party/icu:icuuc", | 189 "//third_party/icu:icuuc", |
173 ] | 190 ] |
174 | 191 |
175 if (is_mac) { | 192 if (is_mac) { |
176 sources += [ | 193 sources += [ |
177 "src/hb-coretext.cc", | 194 "src/hb-coretext.cc", |
178 "src/hb-coretext.h", | 195 "src/hb-coretext.h", |
(...skipping 13 matching lines...) Expand all Loading... |
192 "//build/config/linux:glib", | 209 "//build/config/linux:glib", |
193 ] | 210 ] |
194 sources += [ | 211 sources += [ |
195 "src/hb-ft.cc", | 212 "src/hb-ft.cc", |
196 "src/hb-ft.h", | 213 "src/hb-ft.h", |
197 "src/hb-glib.cc", | 214 "src/hb-glib.cc", |
198 "src/hb-glib.h", | 215 "src/hb-glib.h", |
199 ] | 216 ] |
200 } | 217 } |
201 | 218 |
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 } | |
213 } | 219 } |
214 } | 220 } |
OLD | NEW |