From fc3fc9a4de45c26987eb5d52374466c72fac4f63 Mon Sep 17 00:00:00 2001 From: Anders Rytter Hansen Date: Sat, 22 Feb 2025 13:03:21 +0100 Subject: [PATCH] mesa: enable LTO and add Skylake as target for Rust code --- my-ostree-os/mesa.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/my-ostree-os/mesa.spec b/my-ostree-os/mesa.spec index 5ad3780..dfd0754 100644 --- a/my-ostree-os/mesa.spec +++ b/my-ostree-os/mesa.spec @@ -71,7 +71,7 @@ Name: mesa Summary: Mesa graphics libraries %global ver 25.0.0 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 10.clang.skylake%{?dist} +Release: 11.clang.skylake%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -89,6 +89,7 @@ BuildRequires: meson >= 1.3.0 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang +BuildRequires: lld BuildRequires: gettext %if 0%{?with_hardware} BuildRequires: kernel-headers @@ -373,7 +374,7 @@ cp %{SOURCE1} docs/ %build # ensure standard Rust compiler flags are set -export RUSTFLAGS="%build_rustflags" +export RUSTFLAGS="%build_rustflags -C lto=thin -C linker-plugin-lto -C target-cpu=skylake -C link-arg=-fuse-ld=lld" %if 0%{?with_nvk} export MESON_PACKAGE_CACHE_DIR="%{cargo_registry}/"