mesa: enable LTO and add Skylake as target for Rust code

This commit is contained in:
Anders Rytter Hansen 2025-02-22 13:03:21 +01:00
commit fc3fc9a4de

View file

@ -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}/"