From c09a9fc88c1fe85f4b2b613a440d0e4484d9a07e Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Fri, 14 Jun 2024 12:37:39 +0200 Subject: [PATCH] workaround segfault in compiler on macos-clang-intel XCode 14 seems to be allergic to the string-literal in this lambda expression Change-Id: I1de59883923352c7aa83cc81adafb0218432381a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169030 Tested-by: Jenkins Reviewed-by: Christian Lohmaier (cherry picked from commit bba1193359fd9191bb0e3cdb82cf8911692d675f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170959 Reviewed-by: Xisco Fauli --- opencl/source/openclwrapper.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/opencl/source/openclwrapper.cxx b/opencl/source/openclwrapper.cxx index 16109971c0a9..9588d7426680 100644 --- a/opencl/source/openclwrapper.cxx +++ b/opencl/source/openclwrapper.cxx @@ -86,17 +86,20 @@ OString generateMD5(const void* pData, size_t length) return aBuffer.makeStringAndClear(); } -OString const & getCacheFolder() +// workaround segfault with XCode 14 +OString get_CacheFolder_impl() { - static OString const aCacheFolder = []() - { OUString url(u"${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/cache/"_ustr); rtl::Bootstrap::expandMacros(url); osl::Directory::create(url); return OUStringToOString(url, RTL_TEXTENCODING_UTF8); - }(); +} + +OString const & getCacheFolder() +{ + static OString const aCacheFolder = get_CacheFolder_impl(); return aCacheFolder; } -- 2.11.4.GIT