Package: webkit2gtk / 2.26.4-1~bpo9+3

reduce-memory-overheads.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Alberto Garcia <berto@igalia.com>
Subject: Reduce memory usage when not using the Gold linker
Bug-Debian: https://bugs.debian.org/949621
Forwarded: no
Index: webkitgtk/Source/cmake/OptionsCommon.cmake
===================================================================
--- webkitgtk.orig/Source/cmake/OptionsCommon.cmake
+++ webkitgtk/Source/cmake/OptionsCommon.cmake
@@ -112,6 +112,12 @@ if (DEBUG_FISSION)
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--gdb-index")
 endif ()
 
+# Pass --reduce-memory-overheads to the bfd linker in order to save memory
+if (NOT USE_LD_GOLD)
+    set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
+    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--reduce-memory-overheads")
+endif ()
+
 # Enable the usage of OpenMP.
 #  - At this moment, OpenMP is only used as an alternative implementation
 #    to native threads for the parallelization of the SVG filters.