diff options
-rw-r--r-- | Repository.mk | 1 | ||||
-rw-r--r-- | config_host.mk.in | 1 | ||||
-rw-r--r-- | configure.ac | 19 | ||||
-rw-r--r-- | distro-configs/LibreOfficeOssFuzz.conf | 1 | ||||
-rw-r--r-- | vcl/Module_vcl.mk | 6 |
5 files changed, 28 insertions, 0 deletions
diff --git a/Repository.mk b/Repository.mk index 5f42a924e660..af23d5b20d8f 100644 --- a/Repository.mk +++ b/Repository.mk @@ -93,6 +93,7 @@ $(eval $(call gb_Helper_register_executables_for_install,SDK,sdk, \ $(eval $(call gb_Helper_register_executables_for_install,OOO,brand, \ $(call gb_Helper_optional,BREAKPAD,minidump_upload) \ + $(call gb_Helper_optional,FUZZERS,wmftester) \ $(if $(filter-out ANDROID IOS MACOSX WNT,$(OS)),oosplash) \ soffice_bin \ $(if $(filter DESKTOP,$(BUILD_TYPE)),unopkg_bin) \ diff --git a/config_host.mk.in b/config_host.mk.in index 918174891e0b..95385825c677 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -121,6 +121,7 @@ export ENABLE_COLLADA=@ENABLE_COLLADA@ export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@ export ENABLE_CUPS=@ENABLE_CUPS@ export ENABLE_CURL=@ENABLE_CURL@ +export ENABLE_FUZZERS=@ENABLE_FUZZERS@ export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@ export ENABLE_DBUS=@ENABLE_DBUS@ export ENABLE_DCONF=@ENABLE_DCONF@ diff --git a/configure.ac b/configure.ac index ba2b359c6478..f26c8673b65a 100644 --- a/configure.ac +++ b/configure.ac @@ -1049,6 +1049,11 @@ AC_ARG_ENABLE(fetch-external, [Disables fetching external tarballs from web sources.]) ) +AC_ARG_ENABLE(fuzzers, + AS_HELP_STRING([--enable-fuzzers], + [Enables building libfuzzer targets for fuzz testing.]) +) + AC_ARG_ENABLE(pch, AS_HELP_STRING([--enable-pch], [Enables precompiled header support for C++. Forced default on Windows/VC build]) @@ -9206,6 +9211,20 @@ else fi AC_SUBST(ENABLE_BREAKPAD) +dnl ================================================================== +dnl libfuzzer +dnl ================================================================== +AC_MSG_CHECKING([whether to enable fuzzers]) +if test "$enable_fuzzers" != yes; then + AC_MSG_RESULT([no]) +else + AC_MSG_RESULT([yes]) + ENABLE_FUZZERS="TRUE" + AC_DEFINE(ENABLE_FUZZERS) + BUILD_TYPE="$BUILD_TYPE FUZZERS" +fi +AC_SUBST(ENABLE_FUZZERS) + dnl =================================================================== dnl Orcus dnl =================================================================== diff --git a/distro-configs/LibreOfficeOssFuzz.conf b/distro-configs/LibreOfficeOssFuzz.conf index e556f3765e99..8ca2447bffb8 100644 --- a/distro-configs/LibreOfficeOssFuzz.conf +++ b/distro-configs/LibreOfficeOssFuzz.conf @@ -1,3 +1,4 @@ +--enable-fuzzers --disable-postgresql-sdbc --disable-firebird-sdbc --disable-coinmp diff --git a/vcl/Module_vcl.mk b/vcl/Module_vcl.mk index 767d5f74e05b..7123e41911d9 100644 --- a/vcl/Module_vcl.mk +++ b/vcl/Module_vcl.mk @@ -95,6 +95,12 @@ $(eval $(call gb_Module_add_targets,vcl,\ )) endif +ifneq ($(ENABLE_FUZZERS),) +$(eval $(call gb_Module_add_targets,vcl,\ + Executable_wmftester \ +)) +endif + $(eval $(call gb_Module_add_check_targets,vcl,\ CppunitTest_vcl_lifecycle \ CppunitTest_vcl_bitmap_test \ |