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

Unified Diff: third_party/freetype-android/BUILD.gn

Issue 2720823003: Unify freetype-android and freetype2 into one checkout (Closed)
Patch Set: Pull visibility config in Created 3 years, 10 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
« no previous file with comments | « third_party/freetype-android/.clang-format ('k') | third_party/freetype-android/OWNERS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype-android/BUILD.gn
diff --git a/third_party/freetype-android/BUILD.gn b/third_party/freetype-android/BUILD.gn
index acca85a5c719d8d72dac6882179605cee16e0166..c8828e9908249ab71715ef2e01d5349cdae4b1b4 100644
--- a/third_party/freetype-android/BUILD.gn
+++ b/third_party/freetype-android/BUILD.gn
@@ -4,9 +4,6 @@
import("//build/config/chromecast_build.gni")
-assert(is_android || is_chromecast,
- "This library is only used on Android or Chromecast")
-
config("freetype_config") {
include_dirs = [
"include",
@@ -14,10 +11,23 @@ config("freetype_config") {
]
}
-source_set("freetype") {
+config("freetype-warnings") {
+ cflags = []
+
+ # The reduction of FreeType files to a minimum triggers -Wunused-function
+ # warnings in ftbase.c
+ cflags += [ "-Wno-unused-function" ]
+}
+
+config("freetype-visibility") {
+ cflags = []
+ cflags += [ "-fvisibility=default" ]
+}
+
+component("freetype") {
+ output_name = "freetype"
+ output_extension = "so.6"
sources = [
- # The following files are not sorted alphabetically, but in the
- # same order as in Android.mk to ease maintenance.
"src/src/autofit/autofit.c",
"src/src/base/ftbase.c",
"src/src/base/ftbbox.c",
@@ -42,7 +52,8 @@ source_set("freetype") {
"src/src/truetype/truetype.c",
]
- if (is_chromecast) {
+ if (is_linux || is_chromecast) {
+ # Needed for content_shell on Linux and Chromecast, since fontconfig requires FT_Get_BDF_Property.
sources += [ "src/src/base/ftbdf.c" ]
}
@@ -57,7 +68,11 @@ source_set("freetype") {
public_configs = [ ":freetype_config" ]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [ "//build/config/compiler:no_chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":freetype-warnings",
+ ":freetype-visibility"
+ ]
deps = [
"//third_party/libpng",
« no previous file with comments | « third_party/freetype-android/.clang-format ('k') | third_party/freetype-android/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698