File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ CONFLICTS_INSTALL?= rust-nightly
4848# ?= to allow users to still overwrite it in make.conf.
4949TMPDIR? = ${WRKDIR}
5050
51- OPTIONS_DEFINE = DOCS GDB SOURCES WASM
51+ OPTIONS_DEFINE = DOCS GDB LTO SOURCES WASM
5252OPTIONS_DEFAULT = SOURCES WASM
5353
5454GDB_DESC = Install ports gdb (necessary for debugging rust programs)
@@ -191,7 +191,13 @@ do-configure:
191191 @${ECHO_CMD} 'deny-warnings=false' >> ${WRKSRC}/config.toml
192192 @${ECHO_CMD} 'verbose-tests=true' >> ${WRKSRC}/config.toml
193193 @${ECHO_CMD} 'lld=${_RUST_BUILD_WASM}' >> ${WRKSRC}/config.toml
194+ .if ${PORT_OPTIONS :MLTO}
195+ @${ECHO_CMD} ' lto="thin"' >> ${WRKSRC} /config.toml
196+ .endif
194197 @${ECHO_CMD} '[llvm]' >> ${WRKSRC}/config.toml
198+ .if ${PORT_OPTIONS :MLTO}
199+ @${ECHO_CMD} ' thin-lto=true' >> ${WRKSRC} /config.toml
200+ .endif
195201.if defined(WITH_CCACHE_BUILD) && !defined(NO_CCACHE)
196202 @${ECHO_CMD} 'ccache="${CCACHE_BIN}"' >> ${WRKSRC}/config.toml
197203.else
You can’t perform that action at this time.
0 commit comments