Bug 253421 - databases/mongodb44: add LTO option
Summary: databases/mongodb44: add LTO option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
URL:
Keywords: feature, needs-qa, performance
Depends on:
Blocks:
 
Reported: 2021-02-10 22:23 UTC by Piotr Kubaj
Modified: 2021-02-15 15:14 UTC (History)
1 user (show)

See Also:
ronald-lists: maintainer-feedback+


Attachments
patch (564 bytes, patch)
2021-02-10 22:23 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2021-02-10 22:23:23 UTC
Created attachment 222344 [details]
patch

This patch adds an option for using LTO.
Comment 1 Ronald Klop 2021-02-11 21:26:24 UTC
Test compiling the patch.
Comment 2 Ronald Klop 2021-02-13 08:12:17 UTC
On my computer 8GB RAM + 4GB swap the system runs out memory while compiling this.
What kind of specs are needed?
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2021-02-13 13:02:47 UTC
(In reply to Ronald Klop from comment #2)
Well, LTO is known for requiring large amounts of memory, although the specific amount depends on the software used with LTO.

In case of MongoDB, I noticed that the linker process uses around 25GB RAM.
Comment 4 Ronald Klop 2021-02-15 14:30:28 UTC
Comment on attachment 222344 [details]
patch

I'm ok with the change.
Can't test build it on my machines because of memory usage.
If I get a message about a broken build because of this I want to make the option non-default.
Otherwise it might be a nice optimization on pre-build pkgs.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2021-02-15 15:10:34 UTC
Hm, I actually meant for it to be non-default, but it looks like I accidentally sent the patch that made it default.

Still, if you agree to that, awesome!

FYI, I tested on powerpc64le on 13.0-BETA1.