summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/unotools/configmgr.hxx4
-rw-r--r--unotools/source/config/configmgr.cxx2
2 files changed, 6 insertions, 0 deletions
diff --git a/include/unotools/configmgr.hxx b/include/unotools/configmgr.hxx
index fd2dbb2455c2..5205c9d1664e 100644
--- a/include/unotools/configmgr.hxx
+++ b/include/unotools/configmgr.hxx
@@ -74,7 +74,11 @@ public:
// Avoid using the config layer and rely on defaults which is only useful
// for special test tool targets (typically fuzzing) where start-up speed
// is of the essence
+#if defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
+ static constexpr bool IsFuzzing() { return true; }
+#else
static bool IsFuzzing();
+#endif
static void EnableFuzzing();
private:
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 664282e289d9..d07f6c164598 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -199,10 +199,12 @@ void utl::ConfigManager::doStoreConfigItems() {
static bool bIsFuzzing = false;
+#if !defined(FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION)
bool utl::ConfigManager::IsFuzzing()
{
return bIsFuzzing;
}
+#endif
void utl::ConfigManager::EnableFuzzing()
{