Bug 1382509 - Part3. Build PDFium as a separate library instead of linking it into libxul draft
authorFarmer Tseng <fatseng@mozilla.com>
Tue, 22 Aug 2017 14:17:39 +0800
changeset 650296 b7d04486f58dbd964f878efc5ec9ccc07bfd0f5c
parent 649695 8f0fc1be93fec1a61b732682fbc8449117042ca6
child 650297 0358572ffe806be938338f98eafd93dd450fcf5d
push id75339
push userbmo:fatseng@mozilla.com
push dateTue, 22 Aug 2017 06:21:28 +0000
bugs1382509
milestone57.0a1
Bug 1382509 - Part3. Build PDFium as a separate library instead of linking it into libxul MozReview-Commit-ID: FB4QqbbQF43
modules/pdfium/moz.build
modules/pdfium/pdfium.def
--- 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