summaryrefslogtreecommitdiff
path: root/net-im/telegram-desktop/files/tdesktop-3.5.2-jemalloc-only-telegram.patch
blob: 4f5c7017e6acc9e5e20f8be15010498beb0def45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Only link jemalloc for the Telegram binary

Some combination of factors is making the different codegen tools hang when
jemalloc is linked for those, and they're ran under portage's sandbox. Since
this is only used during build-time, and jemalloc is merely necessary to
improve runtime memory use, it's unnecessary to use it for anything else.

--- tdesktop-3.5.2-full.orig/Telegram/CMakeLists.txt
+++ tdesktop-3.5.2-full/Telegram/CMakeLists.txt
@@ -1357,6 +1357,12 @@
             desktop-app::external_kwayland
         )
     endif()
+
+    target_link_libraries(Telegram
+    PRIVATE
+        desktop-app::linux_jemalloc_helper
+        $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
+    )
 endif()
 
 if (build_macstore)
--- tdesktop-3.5.2-full.orig/cmake/options_linux.cmake
+++ tdesktop-3.5.2-full/cmake/options_linux.cmake
@@ -64,8 +64,6 @@
 
 target_link_libraries(common_options
 INTERFACE
-    desktop-app::linux_jemalloc_helper
-    $<TARGET_OBJECTS:desktop-app::linux_jemalloc_helper>
     ${CMAKE_DL_LIBS}
 )