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

Unified Diff: third_party/freetype/include/freetype-custom-config/ftoption.h

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 | « third_party/freetype/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/freetype/include/freetype-custom-config/ftoption.h
diff --git a/third_party/freetype/include/freetype-custom-config/ftoption.h b/third_party/freetype/include/freetype-custom-config/ftoption.h
index e2d22a877e5b7a40d5cf39c853b3fe42326b1bde..5cb7b06521fc210676ac9669dd4a72f78ec0b3b7 100644
--- a/third_party/freetype/include/freetype-custom-config/ftoption.h
+++ b/third_party/freetype/include/freetype-custom-config/ftoption.h
@@ -309,9 +309,23 @@ FT_BEGIN_HEADER
/* Do not #undef these macros here since the build system might define */
/* them for certain configurations only. */
/* */
-/* #define FT_EXPORT(x) extern x */
-/* #define FT_EXPORT_DEF(x) x */
+#if defined(_WIN32)
+
+#if defined(FT2_BUILD_DLL)
+#if defined(FT2_BUILD_LIBRARY)
+#define FT_EXPORT(x) __declspec(dllexport) x
+#define FT_EXPORT_DEF(x) __declspec(dllexport) x
+#else
+#define FT_EXPORT(x) __declspec(dllimport) x
+#define FT_EXPORT_DEF(x) __declspec(dllimport) x
+#endif
+#endif
+
+#else
+#define FT_EXPORT(x) __attribute__((visibility ("default"))) x
+#define FT_EXPORT_DEF(x) __attribute__((visibility ("default"))) x
+#endif
/*************************************************************************/
/* */
« no previous file with comments | « third_party/freetype/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698