Bug 1382509 - Part3. Build PDFium as a separate library instead of linking it into libxul
MozReview-Commit-ID: FB4QqbbQF43
--- a/modules/pdfium/moz.build
+++ b/modules/pdfium/moz.build
@@ -554,9 +554,12 @@ LOCAL_INCLUDES += [
]
USE_LIBS += [
'media_libjpeg',
]
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
-FINAL_LIBRARY = 'xul'
+GeckoSharedLibrary('pdfium', linkage=None)
+
+if CONFIG['OS_TARGET'] == 'WINNT':
+ DEFFILE = SRCDIR + '/pdfium.def'
new file mode 100644
--- /dev/null
+++ b/modules/pdfium/pdfium.def
@@ -0,0 +1,14 @@
+; This Source Code Form is subject to the terms of the Mozilla Public
+; License, v. 2.0. If a copy of the MPL was not distributed with this
+; file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+LIBRARY pdfium
+EXPORTS
+ FPDF_InitLibrary
+ FPDF_DestroyLibrary
+ FPDF_LoadDocument
+ FPDF_CloseDocument
+ FPDF_GetPageCount
+ FPDF_LoadPage
+ FPDF_ClosePage
+ FPDF_RenderPage