summaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-09 21:06:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 21:06:22 +0000
commit607f3cd63a314cd3a6c219b19cce31805b66cd6d (patch)
tree74c9bff427b4c8f4697ee28b17bbebe2be411cb2 /BUILD.gn
parentd5d48457dabbe71e7f6b0baf2eaea6aa0dc86736 (diff)
downloadpdfium-607f3cd63a314cd3a6c219b19cce31805b66cd6d.tar.xz
Do not build GIF when codec is disabled
Currently all of the GIF related code is being built when support for the codec is disabled, it just isn't being utilized. Depending on the settings being used, this unneeded code may or may not get stripped during linking. This CL explicitly turns off building the GIF codec code if support for GIF is turned off. This also catches a few missed cases from previous CLs. BUG=pdfium:1080 Change-Id: Ie7fe2d894d2ae2f8f36ae05e0ff256f2ce6ef8d4 Reviewed-on: https://pdfium-review.googlesource.com/32330 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn32
1 files changed, 21 insertions, 11 deletions
diff --git a/BUILD.gn b/BUILD.gn
index e6e6ea504e..60ff4983e6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -284,7 +284,9 @@ jumbo_static_library("image_diff") {
"testing/image_diff/image_diff_png.h",
]
configs += [ ":pdfium_core_config" ]
- deps = [ "third_party:png" ]
+ deps = [
+ "third_party:png",
+ ]
}
# Targets below this are only visible within this file (and to the
@@ -786,17 +788,21 @@ jumbo_static_library("fxcodec") {
"core/fxcodec/bmp/fx_bmp.h",
"core/fxcodec/codec/ccodec_bmpmodule.cpp",
"core/fxcodec/codec/ccodec_bmpmodule.h",
- "core/fxcodec/codec/ccodec_gifmodule.cpp",
- "core/fxcodec/codec/ccodec_gifmodule.h",
"core/fxcodec/codec/ccodec_progressivedecoder.h",
"core/fxcodec/codec/fx_codec_progress.cpp",
- "core/fxcodec/gif/cfx_gif.cpp",
- "core/fxcodec/gif/cfx_gif.h",
- "core/fxcodec/gif/cfx_gifcontext.cpp",
- "core/fxcodec/gif/cfx_gifcontext.h",
- "core/fxcodec/gif/cfx_lzwdecompressor.cpp",
- "core/fxcodec/gif/cfx_lzwdecompressor.h",
]
+ if (pdf_enable_xfa_gif) {
+ sources += [
+ "core/fxcodec/codec/ccodec_gifmodule.cpp",
+ "core/fxcodec/codec/ccodec_gifmodule.h",
+ "core/fxcodec/gif/cfx_gif.cpp",
+ "core/fxcodec/gif/cfx_gif.h",
+ "core/fxcodec/gif/cfx_gifcontext.cpp",
+ "core/fxcodec/gif/cfx_gifcontext.h",
+ "core/fxcodec/gif/cfx_lzwdecompressor.cpp",
+ "core/fxcodec/gif/cfx_lzwdecompressor.h",
+ ]
+ }
if (pdf_enable_xfa_png) {
sources += [
"core/fxcodec/codec/ccodec_pngmodule.cpp",
@@ -2921,8 +2927,6 @@ test("pdfium_unittests") {
include_dirs = []
if (pdf_enable_xfa) {
sources += [
- "core/fxcodec/gif/cfx_gifcontext_unittest.cpp",
- "core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp",
"core/fxcrt/css/cfx_cssdeclaration_unittest.cpp",
"core/fxcrt/css/cfx_cssstylesheet_unittest.cpp",
"core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp",
@@ -2949,6 +2953,12 @@ test("pdfium_unittests") {
"xfa/fxfa/parser/cxfa_xmllocale_unittest.cpp",
"xfa/fxfa/parser/xfa_utils_unittest.cpp",
]
+ if (pdf_enable_xfa_gif) {
+ sources += [
+ "core/fxcodec/gif/cfx_gifcontext_unittest.cpp",
+ "core/fxcodec/gif/cfx_lzwdecompressor_unittest.cpp",
+ ]
+ }
}
if (pdf_use_skia || pdf_use_skia_paths) {
sources += [ "core/fxge/skia/fx_skia_device_unittest.cpp" ]