diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-05-09 20:31:12 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 20:31:12 +0000 |
commit | d5d48457dabbe71e7f6b0baf2eaea6aa0dc86736 (patch) | |
tree | 5694486d6c11a60a0ce602759c3c1e07c63b46fc /testing/libfuzzer/BUILD.gn | |
parent | 54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (diff) | |
download | pdfium-d5d48457dabbe71e7f6b0baf2eaea6aa0dc86736.tar.xz |
Do not build PNG when codec is disabled
Currently all of the PNG 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 PNG codec code if support
for PNG is turned off.
BUG=pdfium:1080
Change-Id: I9c5247145fcadbcb1bd2243aa83350304ba421ff
Reviewed-on: https://pdfium-review.googlesource.com/32270
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'testing/libfuzzer/BUILD.gn')
-rw-r--r-- | testing/libfuzzer/BUILD.gn | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/testing/libfuzzer/BUILD.gn b/testing/libfuzzer/BUILD.gn index a45c8d2576..5a050a2237 100644 --- a/testing/libfuzzer/BUILD.gn +++ b/testing/libfuzzer/BUILD.gn @@ -42,12 +42,14 @@ group("libfuzzer") { ":pdf_codec_bmp_fuzzer", ":pdf_codec_gif_fuzzer", ":pdf_codec_jpeg_fuzzer", - ":pdf_codec_png_fuzzer", ":pdf_css_fuzzer", ":pdf_fm2js_fuzzer", ":pdf_formcalc_fuzzer", ":pdf_lzw_fuzzer", ] + if (pdf_enable_xfa_png) { + deps += [ ":pdf_codec_png_fuzzer" ] + } if (pdf_enable_xfa_tiff) { deps += [ ":pdf_codec_tiff_fuzzer" ] } @@ -100,11 +102,13 @@ if (pdf_enable_xfa) { ] } - pdfium_fuzzer("pdf_codec_png_fuzzer") { - sources = [ - "pdf_codec_png_fuzzer.cc", - "xfa_codec_fuzzer.h", - ] + if (pdf_enable_xfa_png) { + pdfium_fuzzer("pdf_codec_png_fuzzer") { + sources = [ + "pdf_codec_png_fuzzer.cc", + "xfa_codec_fuzzer.h", + ] + } } if (pdf_enable_xfa_tiff) { |