Skip to content

Commit

Permalink
Mk/Features/lto.mk: explicitly disable LTO for Rust when LTO_UNSAFE
Browse files Browse the repository at this point in the history
Some ports enable LTO in Cargo.toml and need -C lto=no
being passed to disable it.
  • Loading branch information
pkubaj committed Feb 11, 2024
1 parent 33b550f commit 1b28617
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Mk/Features/lto.mk
Expand Up @@ -27,5 +27,9 @@ LTO_Include_MAINTAINER= pkubaj@FreeBSD.org
CXXFLAGS+= ${LTO_FLAGS}
LDFLAGS+= ${LTO_FLAGS}
. endif
. else
. if defined(_INCLUDE_USES_CARGO_MK)
RUSTFLAGS+= -C lto=no
. endif
. endif
.endif

0 comments on commit 1b28617

Please sign in to comment.