From 53c8ae81fa8420695a99f610df75a3ee3943555c 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 (cherry picked from commit fc3fc9a4de45c26987eb5d52374466c72fac4f63) # Conflicts: # my-ostree-os/mesa.spec --- my-ostree-os/mesa.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/my-ostree-os/mesa.spec b/my-ostree-os/mesa.spec index 98be03a..ad80295 100644 --- a/my-ostree-os/mesa.spec +++ b/my-ostree-os/mesa.spec @@ -94,6 +94,7 @@ BuildRequires: meson >= 1.3.0 BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang +BuildRequires: lld BuildRequires: gettext %if 0%{?with_hardware} BuildRequires: kernel-headers @@ -393,7 +394,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}/"