Bug 272321 - Mk/Uses/meson.mk: Disable default optimization when buildtype is release
Summary: Mk/Uses/meson.mk: Disable default optimization when buildtype is release
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: Daniel Engberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-02 02:52 UTC by Daniel Engberg
Modified: 2023-07-03 20:03 UTC (History)
1 user (show)

See Also:


Attachments
Patch for meson (314 bytes, patch)
2023-07-02 02:52 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2023-07-02 02:52:59 UTC
Created attachment 243116 [details]
Patch for meson

We already rely on our framework to set optimization so disable default optimization set by Meson when defining release as buildtype.

https://mesonbuild.com/Builtin-options.html#details-for-buildtype
Comment 1 Jan Beich freebsd_committer freebsd_triage 2023-07-03 10:57:04 UTC
Looks OK and similar to USES=cmake.

See also https://www.phoronix.com/review/clang-12-opt
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-07-03 20:02:02 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=84ffbf46e812acd734565613e0008e196a62cadc

commit 84ffbf46e812acd734565613e0008e196a62cadc
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-07-03 19:50:44 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-07-03 20:00:17 +0000

    Mk/Uses/meson.mk: Disable predefined optimization level when buildtype is release

    Ports framework handles optimization levels so disable Meson's
    predefined optimization level

    Reference:
    https://mesonbuild.com/Builtin-options.html#details-for-buildtype

    PR:             272321
    Reviewed by:    jbeich

 Mk/Uses/meson.mk | 1 +
 1 file changed, 1 insertion(+)