From nobody Mon Sep 26 21:58:35 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MbxTm0TBMz4V9r9; Mon, 26 Sep 2022 21:58:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MbxTl73gzz3vQb; Mon, 26 Sep 2022 21:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664229516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B85F+uD+W6fVxI9jOR6sqXepnUSzElJviPtU8yzG5+s=; b=TgfgLmW85sLfpkjzNzRpaTZZ6HBTtMod2MxDS7O3w8+I55qzb+wFiNKcn5hwT4SiuR7T9M VizhbyJ/HBn0qoL2jwSWqoPcT9Q9GV5t2n1sOZ8HOzJ6cFS1iFP7QyAvTHzLQop3nIbkKV lrSS4yoL0u9p0XKEnBFqp3b+/Dm0V63b1cAGS0SXs3mKp+ugWF03I14QZsO8YYj9AthBBM wmwT3qKUEJ7swDiQrk5sZNmrCS4ISu3a/Y5OJL05L3I8T+CshiJYh0pTqwdSKrF12A0cvD AsNVZR7WXAdUU1rlysk3QVtPtKeXNqdcZFcHgtnUG1TEYYsBpBgFOW4IxfOiAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MbxTl5nZdzvPf; Mon, 26 Sep 2022 21:58:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28QLwZPb025062; Mon, 26 Sep 2022 21:58:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28QLwZan025061; Mon, 26 Sep 2022 21:58:35 GMT (envelope-from git) Date: Mon, 26 Sep 2022 21:58:35 GMT Message-Id: <202209262158.28QLwZan025061@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 83a19a60d13f - main - Mk/Features/lto.mk: Use Cargo and Meson toggles List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83a19a60d13fee8dc2f86ee5f4d48208fd6cabab Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664229516; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B85F+uD+W6fVxI9jOR6sqXepnUSzElJviPtU8yzG5+s=; b=RunD51xGxy7YDyjwzxElMSAP6TlK3egEQL1W/jwRFRABpgBjLAx3ViT0xvWEyjyIyx1ezx 2gVAgiZE8e4nG7qjATU8FsXf4dxeG7CK8yhnzrKMv4hz1C+jsMZaqMt4df98QaE9ig4nm1 jtNTl2cPMfnTbFWdIzK4199raLDjbo8zV43NsNr/kPIkheFyDXM2Fiwx5OaXtUyihg5ajx Ad2d/oogYmk6vweZoXkk7XrEOsqomGRefqkrwS+LRmD5VFYiofEwb8ju/LG0mkz0YR5LqC IqZBw7nSO0oHIYF0o3SMsfdFOdyAyf5om34y3mpNkCs11fPtyqliYTcKIQi6TQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664229516; a=rsa-sha256; cv=none; b=pt7ezPXpH3lW30zTUNq6xz5jJc4A84HZO0dVmUEw30KxmtJkHWyBM1B2LKKpoDu1Cb50q1 t6lLOyoFQYXN6/UyHpjtLIKj+BtzDbzCBy8O75mp/wzvWZKYDspsku0TQCvlh3CfwUas/E ZepPabsWPBZ6PVLQaaEh5/eHG41tLf22DVfbFqkqjr5wiMrUk+t+7n6MogJsN6JPc3jm71 //HT8QZvRONrNLxquu5qyRCXTOj0xEfrfryW4AqbD6jVd2/jivSIWNcbE1WFR6lJo4KQ/N zoH7sRF6y0WZC6NXkHxQSzXkp/EEN60j9Iz9cauB/gdnlPmiOktZlp2OqV1fGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=83a19a60d13fee8dc2f86ee5f4d48208fd6cabab commit 83a19a60d13fee8dc2f86ee5f4d48208fd6cabab Author: Daniel Engberg AuthorDate: 2022-09-26 21:56:46 +0000 Commit: Daniel Engberg CommitDate: 2022-09-26 21:57:18 +0000 Mk/Features/lto.mk: Use Cargo and Meson toggles Use corresponding toggles for each build framework to enable LTO Reviewed by: pkubaj (maintainer) Differential Revision: https://reviews.freebsd.org/D36696 --- Mk/Features/lto.mk | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Mk/Features/lto.mk b/Mk/Features/lto.mk index 9d38448f312c..75935b52ca89 100644 --- a/Mk/Features/lto.mk +++ b/Mk/Features/lto.mk @@ -8,10 +8,18 @@ _LTO_MK_INCLUDED= yes LTO_Include_MAINTAINER= pkubaj@FreeBSD.org . if !defined(LTO_UNSAFE) +. if defined(_INCLUDE_USES_CARGO_MK) + CARGO_ENV+= CARGO_PROFILE_RELEASE_LTO="true" \ + CARGO_PROFILE_RELEASE_PANIC="abort" \ + CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1 +. elif defined(_INCLUDE_USES_MESON_MK) + MESON_ARGS+= -Db_lto=true +. else # Overridable as a user may want to use -flto -LTO_FLAGS?= -flto=thin -CFLAGS+= ${LTO_FLAGS} -CXXFLAGS+= ${LTO_FLAGS} -LDFLAGS+= ${LTO_FLAGS} + LTO_FLAGS?= -flto=thin + CFLAGS+= ${LTO_FLAGS} + CXXFLAGS+= ${LTO_FLAGS} + LDFLAGS+= ${LTO_FLAGS} +. endif . endif .endif