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

Unified Diff: third_party/freetype/BUILD.gn

Issue 2738383002: Manage FreeType symbol visibility using platform specific FT_EXPORT (Closed)
Patch Set: Improve windows visibility matching Created 3 years, 9 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 | « no previous file | third_party/freetype/include/freetype-custom-config/ftoption.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/BUILD.gn
diff --git a/third_party/freetype/BUILD.gn b/third_party/freetype/BUILD.gn
index ab0c1b0626edd12200c45d2d51998da08dba3d39..b2f02d3aa70bd919d8ba7cd2949976476f460255 100644
--- a/third_party/freetype/BUILD.gn
+++ b/third_party/freetype/BUILD.gn
@@ -14,14 +14,11 @@ config("freetype_config") {
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" ]
+ if (is_clang) {
+ # The reduction of FreeType files to a minimum triggers -Wunused-function
+ # warnings in ftbase.c
+ cflags += [ "-Wno-unused-function" ]
+ }
}
component("freetype") {
@@ -77,13 +74,16 @@ component("freetype") {
"FT_CONFIG_OPTIONS_H=<freetype-custom-config/ftoption.h>",
]
+ if (is_win && is_component_build) {
+ # Used for managing declspec(dllimport/export) visibility.
+ defines += [ "FT2_BUILD_DLL" ]
+ }
+
public_configs = [ ":freetype_config" ]
configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":freetype-warnings",
- ":freetype-visibility",
- ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ configs += [ ":freetype-warnings" ]
deps = [
"//third_party/libpng",
« no previous file with comments | « no previous file | third_party/freetype/include/freetype-custom-config/ftoption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698