summaryrefslogtreecommitdiff
path: root/testing/libfuzzer
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-11-07 08:34:09 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-07 08:34:09 -0800
commit9adabf8867243579ce9cf8969707a9b919065090 (patch)
tree127477b084005457579c599b2ec9eef0668a1479 /testing/libfuzzer
parent470b5fa8f8dbfd2aa702d9d8cfdc03a7b486b374 (diff)
downloadpdfium-9adabf8867243579ce9cf8969707a9b919065090.tar.xz
Revert of Compile fuzzer sources in standalone builds. (patchset #3 id:40001 of https://codereview.chromium.org/2480043002/ )
Reason for revert: Breaking the tree: https://build.chromium.org/p/client.pdfium/builders/windows_xfa_32/builds/619/steps/compile%20with%20ninja/logs/stdio Original issue's description: > Compile fuzzer sources in standalone builds. > > - Add a template for fuzzers to remove redundancy. > - Sort fuzzers in alphabetical order. > > Committed: https://pdfium.googlesource.com/pdfium/+/470b5fa8f8dbfd2aa702d9d8cfdc03a7b486b374 TBR=dsinclair@chromium.org,thestig@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/2480323002
Diffstat (limited to 'testing/libfuzzer')
-rw-r--r--testing/libfuzzer/BUILD.gn225
1 files changed, 176 insertions, 49 deletions
diff --git a/testing/libfuzzer/BUILD.gn b/testing/libfuzzer/BUILD.gn
index 2b9915d322..e89918b05f 100644
--- a/testing/libfuzzer/BUILD.gn
+++ b/testing/libfuzzer/BUILD.gn
@@ -5,7 +5,7 @@
import("../../pdfium.gni")
config("libfuzzer_config") {
- configs = [ "../..:pdfium_core_config" ]
+ configs = [ "//third_party/pdfium:pdfium_core_config" ]
defines = [
"PNG_PREFIX",
@@ -20,129 +20,256 @@ config("libfuzzer_config") {
}
}
-group("libfuzzer") {
-}
-
-template("pdfium_fuzzer") {
- source_set(target_name) {
- sources = invoker.sources
+if (pdf_enable_xfa) {
+ source_set("pdf_fm2js_fuzzer") {
+ testonly = true
+ sources = [
+ "pdf_fm2js_fuzzer.cc",
+ ]
deps = [
- "../..:pdfium",
+ "//third_party/pdfium:pdfium",
]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
+ }
+ source_set("pdf_xml_fuzzer") {
testonly = true
+ sources = [
+ "pdf_xml_fuzzer.cc",
+ ]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [
"//build/config/compiler:no_chromium_code",
":libfuzzer_config",
]
}
-}
-
-if (pdf_enable_xfa) {
- pdfium_fuzzer("pdf_cfx_saxreader_fuzzer") {
+ source_set("pdf_cfx_saxreader_fuzzer") {
+ testonly = true
sources = [
"pdf_cfx_saxreader_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_codec_bmp_fuzzer") {
+ source_set("pdf_codec_png_fuzzer") {
+ testonly = true
sources = [
- "pdf_codec_bmp_fuzzer.cc",
+ "pdf_codec_png_fuzzer.cc",
"xfa_codec_fuzzer.h",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_codec_gif_fuzzer") {
+ source_set("pdf_codec_jpeg_fuzzer") {
+ testonly = true
sources = [
- "pdf_codec_gif_fuzzer.cc",
+ "pdf_codec_jpeg_fuzzer.cc",
"xfa_codec_fuzzer.h",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_codec_jpeg_fuzzer") {
+ source_set("pdf_codec_gif_fuzzer") {
+ testonly = true
sources = [
- "pdf_codec_jpeg_fuzzer.cc",
+ "pdf_codec_gif_fuzzer.cc",
"xfa_codec_fuzzer.h",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_codec_png_fuzzer") {
+ source_set("pdf_codec_bmp_fuzzer") {
+ testonly = true
sources = [
- "pdf_codec_png_fuzzer.cc",
+ "pdf_codec_bmp_fuzzer.cc",
"xfa_codec_fuzzer.h",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_codec_tiff_fuzzer") {
+ source_set("pdf_codec_tiff_fuzzer") {
+ testonly = true
sources = [
"pdf_codec_tiff_fuzzer.cc",
"xfa_codec_fuzzer.h",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-
- pdfium_fuzzer("pdf_css_fuzzer") {
+ source_set("pdf_css_fuzzer") {
+ testonly = true
sources = [
"pdf_css_fuzzer.cc",
]
- }
-
- pdfium_fuzzer("pdf_fm2js_fuzzer") {
- sources = [
- "pdf_fm2js_fuzzer.cc",
+ deps = [
+ "//third_party/pdfium:pdfium",
]
- }
-
- pdfium_fuzzer("pdf_xml_fuzzer") {
- sources = [
- "pdf_xml_fuzzer.cc",
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
]
}
}
-pdfium_fuzzer("pdf_cmap_fuzzer") {
+source_set("pdf_cmap_fuzzer") {
+ testonly = true
sources = [
"pdf_cmap_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-pdfium_fuzzer("pdf_codec_fax_fuzzer") {
+source_set("pdf_codec_fax_fuzzer") {
+ testonly = true
sources = [
"pdf_codec_fax_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-pdfium_fuzzer("pdf_codec_icc_fuzzer") {
+source_set("pdf_codec_icc_fuzzer") {
+ testonly = true
sources = [
"pdf_codec_icc_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-pdfium_fuzzer("pdf_codec_jbig2_fuzzer") {
+source_set("pdf_codec_jbig2_fuzzer") {
+ testonly = true
sources = [
"pdf_codec_jbig2_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}
-pdfium_fuzzer("pdf_hint_table_fuzzer") {
+source_set("pdf_jpx_fuzzer") {
+ testonly = true
sources = [
- "pdf_hint_table_fuzzer.cc",
+ "pdf_jpx_fuzzer.cc",
+ ]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
]
}
-pdfium_fuzzer("pdf_jpx_fuzzer") {
+source_set("pdf_psengine_fuzzer") {
+ testonly = true
sources = [
- "pdf_jpx_fuzzer.cc",
+ "pdf_psengine_fuzzer.cc",
+ ]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
]
}
-pdfium_fuzzer("pdf_psengine_fuzzer") {
+source_set("pdf_hint_table_fuzzer") {
+ testonly = true
sources = [
- "pdf_psengine_fuzzer.cc",
+ "pdf_hint_table_fuzzer.cc",
+ ]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
]
}
-pdfium_fuzzer("pdf_streamparser_fuzzer") {
+source_set("pdf_streamparser_fuzzer") {
+ testonly = true
sources = [
"pdf_streamparser_fuzzer.cc",
]
+ deps = [
+ "//third_party/pdfium:pdfium",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":libfuzzer_config",
+ ]
}