Reduce memory usage
authorAlberto Garcia <berto@igalia.com>
Tue, 9 Apr 2024 12:09:50 +0000 (14:09 +0200)
committerAlberto Garcia <berto@igalia.com>
Tue, 9 Apr 2024 12:09:50 +0000 (14:09 +0200)
Bug-Debian: https://bugs.debian.org/949621
Forwarded: no

===================================================================

Gbp-Pq: Name reduce-memory-overheads.patch

Source/cmake/OptionsCommon.cmake

index 079be5eb7f934e7f52f93875f35da2ad506d6f4f..2fddf295e61ff5b7c3b260253e0523efdfdd9583 100644 (file)
@@ -194,6 +194,10 @@ option(GCC_OFFLINEASM_SOURCE_MAP
 
 option(USE_APPLE_ICU "Use Apple's internal ICU" ${APPLE})
 
+# Pass --reduce-memory-overheads to the bfd linker in order to save memory
+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")
+
 # 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.