From 3eae1832ec89532308fe82c19b22afc21c820bcf Mon Sep 17 00:00:00 2001 From: jolavillette Date: Wed, 29 Jul 2026 14:18:38 +0200 Subject: [PATCH] build: enable OpenMP for the parallel GXS deserialisation Adds -fopenmp where the qmake build compiles and links libretroshare. The previous version of this change also dropped rs_deep_forums_index from the xapian link condition in use_libretroshare.pri; that was unrelated and would have broken deep-forum-index builds, so it is not carried over. CMake builds do not set the flag yet: there the pragma is ignored and the loop runs serially, which is correct, just not parallel. Co-Authored-By: Claude Opus 5 (1M context) --- src/libretroshare.pro | 4 ++++ src/use_libretroshare.pri | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/libretroshare.pro b/src/libretroshare.pro index b5c015375..d055e8738 100644 --- a/src/libretroshare.pro +++ b/src/libretroshare.pro @@ -21,6 +21,10 @@ DESTDIR = lib QMAKE_CXXFLAGS += -fPIC +# OpenMP support for parallel deserialization in GXS (rsgenexchange.cc) +QMAKE_CXXFLAGS += -fopenmp +LIBS += -fopenmp + ## Uncomment to enable Unfinished Services. #CONFIG += wikipoos #CONFIG += gxsthewire diff --git a/src/use_libretroshare.pri b/src/use_libretroshare.pri index 85377d042..9706c332b 100644 --- a/src/use_libretroshare.pri +++ b/src/use_libretroshare.pri @@ -106,6 +106,8 @@ rs_jsonapi { linux-* { mLibs += dl + # OpenMP runtime needed for parallel deserialization in rsgenexchange.cc + LIBS += -fopenmp } rs_deep_channels_index | rs_deep_files_index | rs_deep_forums_index {