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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 defines = [ | 138 defines = [ |
139 "HAVE_OT", | 139 "HAVE_OT", |
140 "HAVE_ICU", | 140 "HAVE_ICU", |
141 "HAVE_ICU_BUILTIN", | 141 "HAVE_ICU_BUILTIN", |
142 "HB_NO_MT", | 142 "HB_NO_MT", |
143 ] | 143 ] |
144 | 144 |
145 configs -= [ "//build/config/compiler:chromium_code" ] | 145 configs -= [ "//build/config/compiler:chromium_code" ] |
146 configs += [ "//build/config/compiler:no_chromium_code" ] | 146 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 147 |
| 148 config("harfbuzz_warnings") { |
| 149 cflags = [] |
| 150 if (is_clang) { |
| 151 cflags += [ |
| 152 "-Wno-unused-value", |
| 153 # Harfbuzz uses unused typedefs for its static asserts (and its |
| 154 # static asserts are strange enough that they can't be replaced |
| 155 # by static_assert). |
| 156 "-Wno-unused-local-typedef", |
| 157 ] |
| 158 } |
| 159 if (is_win) { |
| 160 cflags += [ "/wd4334" ] # Result of 32-bit shift implicitly converted t
o 64 bits. |
| 161 } |
| 162 } |
| 163 configs += [ ":harfbuzz_warnings" ] |
| 164 |
147 public_configs = [ ":harfbuzz-ng_config" ] | 165 public_configs = [ ":harfbuzz-ng_config" ] |
148 | 166 |
149 deps = [ | 167 deps = [ |
150 "//third_party/icu:icuuc", | 168 "//third_party/icu:icuuc", |
151 ] | 169 ] |
152 | 170 |
153 cflags = [] | |
154 if (is_clang) { | |
155 cflags += [ "-Wno-unused-value" ] | |
156 } | |
157 if (is_win) { | |
158 cflags += [ "/wd4334" ] # Result of 32-bit shift implicitly converted to
64 bits. | |
159 } | |
160 if (is_mac) { | 171 if (is_mac) { |
161 sources += [ | 172 sources += [ |
162 "src/hb-coretext.cc", | 173 "src/hb-coretext.cc", |
163 "src/hb-coretext.h", | 174 "src/hb-coretext.h", |
164 ] | 175 ] |
165 defines += [ "HAVE_CORETEXT" ] | 176 defines += [ "HAVE_CORETEXT" ] |
166 } | 177 } |
167 | 178 |
168 # When without -fvisibility=hidden for pango to use the harfbuzz | 179 # When without -fvisibility=hidden for pango to use the harfbuzz |
169 # in the tree, all symbols pango needs must be included, or | 180 # in the tree, all symbols pango needs must be included, or |
(...skipping 19 matching lines...) Expand all Loading... |
189 if (is_linux && use_pango && !is_chromeos && !is_official_build && | 200 if (is_linux && use_pango && !is_chromeos && !is_official_build && |
190 current_cpu != "arm" && !is_component_build) { | 201 current_cpu != "arm" && !is_component_build) { |
191 # These symbols are referenced from libpangoft2, which will be | 202 # These symbols are referenced from libpangoft2, which will be |
192 # dynamically linked later. | 203 # dynamically linked later. |
193 ldflags = | 204 ldflags = |
194 [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] | 205 [ "-Wl,-uhb_ft_face_create_cached,-uhb_glib_get_unicode_funcs" ] |
195 } | 206 } |
196 } | 207 } |
197 } | 208 } |
198 } | 209 } |
OLD | NEW |