Index: tools/skimage_main.cpp |
diff --git a/tools/skimage_main.cpp b/tools/skimage_main.cpp |
index dc5bdd42607be18b3ad55cc87e0f14977d49800f..b486d5d1a3fd45cab4a0af407719e5eda88550ca 100644 |
--- a/tools/skimage_main.cpp |
+++ b/tools/skimage_main.cpp |
@@ -159,8 +159,15 @@ int tool_main(int argc, char** argv) { |
void forceLinking(); |
void forceLinking() { |
+ // This function leaks, but that is okay because it is not intended |
+ // to be called. It is only here so that the linker will include the |
+ // decoders. |
SkDEBUGCODE(SkImageDecoder *creator = ) CreateJPEGImageDecoder(); |
SkASSERT(creator); |
+#ifdef SK_BUILD_FOR_UNIX |
+ SkDEBUGCODE(creator = ) CreateGIFImageDecoder(); |
+ SkASSERT(creator); |
+#endif |
} |
#if !defined SK_BUILD_FOR_IOS |