opencl/source/openclwrapper.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit c09a9fc88c1fe85f4b2b613a440d0e4484d9a07e
Author:     Christian Lohmaier <[email protected]>
AuthorDate: Fri Jun 14 12:37:39 2024 +0200
Commit:     Xisco Fauli <[email protected]>
CommitDate: Thu Jul 25 17:14:10 2024 +0200

    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 <[email protected]>
    (cherry picked from commit bba1193359fd9191bb0e3cdb82cf8911692d675f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170959
    Reviewed-by: Xisco Fauli <[email protected]>

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;
 }
 

Reply via email to