Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(346)

Unified Diff: testing/libfuzzer/BUILD.gn

Issue 2480043002: Compile fuzzer sources in standalone builds. (Closed)
Patch Set: Sort fuzzer targets Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/libfuzzer/BUILD.gn
diff --git a/testing/libfuzzer/BUILD.gn b/testing/libfuzzer/BUILD.gn
index e89918b05f8c0a097b583fe7f6e04a4e28722a4f..2b9915d3223a3b36a23dac1ab1d7eb475f4de786 100644
--- a/testing/libfuzzer/BUILD.gn
+++ b/testing/libfuzzer/BUILD.gn
@@ -5,7 +5,7 @@
import("../../pdfium.gni")
config("libfuzzer_config") {
- configs = [ "//third_party/pdfium:pdfium_core_config" ]
+ configs = [ "../..:pdfium_core_config" ]
defines = [
"PNG_PREFIX",
@@ -20,256 +20,129 @@ config("libfuzzer_config") {
}
}
-if (pdf_enable_xfa) {
- source_set("pdf_fm2js_fuzzer") {
- testonly = true
- sources = [
- "pdf_fm2js_fuzzer.cc",
- ]
+group("libfuzzer") {
+}
+
+template("pdfium_fuzzer") {
+ source_set(target_name) {
+ sources = invoker.sources
deps = [
- "//third_party/pdfium: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",
]
}
- source_set("pdf_cfx_saxreader_fuzzer") {
- testonly = true
+}
+
+if (pdf_enable_xfa) {
+ pdfium_fuzzer("pdf_cfx_saxreader_fuzzer") {
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",
- ]
}
- source_set("pdf_codec_png_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_codec_bmp_fuzzer") {
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",
- ]
}
- source_set("pdf_codec_jpeg_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_codec_gif_fuzzer") {
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",
- ]
}
- source_set("pdf_codec_gif_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_codec_jpeg_fuzzer") {
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",
- ]
}
- source_set("pdf_codec_bmp_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_codec_png_fuzzer") {
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",
- ]
}
- source_set("pdf_codec_tiff_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_codec_tiff_fuzzer") {
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",
- ]
}
- source_set("pdf_css_fuzzer") {
- testonly = true
+
+ pdfium_fuzzer("pdf_css_fuzzer") {
sources = [
"pdf_css_fuzzer.cc",
]
- deps = [
- "//third_party/pdfium:pdfium",
+ }
+
+ pdfium_fuzzer("pdf_fm2js_fuzzer") {
+ sources = [
+ "pdf_fm2js_fuzzer.cc",
]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":libfuzzer_config",
+ }
+
+ pdfium_fuzzer("pdf_xml_fuzzer") {
+ sources = [
+ "pdf_xml_fuzzer.cc",
]
}
}
-source_set("pdf_cmap_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_cmap_fuzzer") {
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",
- ]
}
-source_set("pdf_codec_fax_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_codec_fax_fuzzer") {
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",
- ]
}
-source_set("pdf_codec_icc_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_codec_icc_fuzzer") {
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",
- ]
}
-source_set("pdf_codec_jbig2_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_codec_jbig2_fuzzer") {
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",
- ]
}
-source_set("pdf_jpx_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_hint_table_fuzzer") {
sources = [
- "pdf_jpx_fuzzer.cc",
- ]
- deps = [
- "//third_party/pdfium:pdfium",
- ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":libfuzzer_config",
+ "pdf_hint_table_fuzzer.cc",
]
}
-source_set("pdf_psengine_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_jpx_fuzzer") {
sources = [
- "pdf_psengine_fuzzer.cc",
- ]
- deps = [
- "//third_party/pdfium:pdfium",
- ]
- configs -= [ "//build/config/compiler:chromium_code" ]
- configs += [
- "//build/config/compiler:no_chromium_code",
- ":libfuzzer_config",
+ "pdf_jpx_fuzzer.cc",
]
}
-source_set("pdf_hint_table_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_psengine_fuzzer") {
sources = [
- "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",
+ "pdf_psengine_fuzzer.cc",
]
}
-source_set("pdf_streamparser_fuzzer") {
- testonly = true
+pdfium_fuzzer("pdf_streamparser_fuzzer") {
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",
- ]
}
« no previous file with comments | « BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698