From 27924e6c9d43f0eba57d14004853d5a8ba47de26 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 9 May 2018 14:42:42 +0000 Subject: Do not build TIFF when codec is disabled Currently all of the TIFF 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 TIFF codec code if support for TIFF is turned off. It also fixes cases in the code base where tif was being used instead of tiff. BUG=pdfium:1080 Change-Id: If6aaa8af5160fdd5b261e63bab7d5984196efcc9 Reviewed-on: https://pdfium-review.googlesource.com/32193 Commit-Queue: Ryan Harrison Reviewed-by: Tom Sepez --- BUILD.gn | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'BUILD.gn') diff --git a/BUILD.gn b/BUILD.gn index 874a8f7d81..c6663ec8f3 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -794,8 +794,6 @@ jumbo_static_library("fxcodec") { "core/fxcodec/codec/ccodec_pngmodule.cpp", "core/fxcodec/codec/ccodec_pngmodule.h", "core/fxcodec/codec/ccodec_progressivedecoder.h", - "core/fxcodec/codec/ccodec_tiffmodule.cpp", - "core/fxcodec/codec/ccodec_tiffmodule.h", "core/fxcodec/codec/fx_codec_progress.cpp", "core/fxcodec/gif/cfx_gif.cpp", "core/fxcodec/gif/cfx_gif.h", @@ -804,10 +802,14 @@ jumbo_static_library("fxcodec") { "core/fxcodec/gif/cfx_lzwdecompressor.cpp", "core/fxcodec/gif/cfx_lzwdecompressor.h", ] - deps += [ - "third_party:fx_tiff", - "third_party:png", - ] + deps += [ "third_party:png" ] + if (pdf_enable_xfa_tiff) { + sources += [ + "core/fxcodec/codec/ccodec_tiffmodule.cpp", + "core/fxcodec/codec/ccodec_tiffmodule.h", + ] + deps += [ "third_party:fx_tiff" ] + } } if (is_posix || is_fuchsia) { # core/fxcodec/fx_libopenjpeg/src/fx_mct.c does an pointer-to-int -- cgit v1.2.3