!525 [sync] PR-522: [平行宇宙] Disable ThinLTO when building with clang

From: @openeuler-sync-bot 
Reviewed-by: @xuxuepeng 
Signed-off-by: @xuxuepeng
This commit is contained in:
openeuler-ci-bot 2024-04-25 11:55:38 +00:00 committed by Gitee
commit 1e4cd292e2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,5 +1,5 @@
%global _release 13
%global enable_isulad 1
%global _release 14
%bcond isulad 1
Name: lxc
Version: 5.0.2
@ -88,11 +88,13 @@ This package contains documentation for lxc for creating containers.
%ifarch riscv64
export LDFLAGS="%{build_ldflags} -latomic -pthread"
%endif
%if 0%{?enable_isulad}
meson setup -Disulad=true -Dtests=true -Dprefix=/usr build
%else
meson setup -Disulad=false -Dtests=true -Dprefix=/usr build
meson setup -Dtests=true \
%{?with_isulad:-Disulad=true} \
%{!?with_isulad:-Disulad=false} \
%if "%{?toolchain}" == "clang"
-Db_lto=false \
%endif
-Dprefix=/usr build
meson compile -C build
%install
@ -193,7 +195,7 @@ meson test -C build
%{_datadir}/%{name}/config/*
%dir %{_datadir}/%{name}/__pycache__
%{_datadir}/%{name}/__pycache__/*
%if !0%{?enable_isulad}
%if %{without isulad}
%{_datadir}/%{name}/hooks
%endif
@ -212,6 +214,12 @@ meson test -C build
%endif
%changelog
* Mon Mar 11 2024 jchzhou <zhoujiacheng@iscas.ac.cn> - 5.0.2-14
- Type: bugfix
- ID:NA
- SUG:NA
- DESC: update meson parameters for disabling LTO when building with clang & ld.bfd
* Mon Feb 26 2024 jikai<jikai11@huawei.com> - 5.0.2-13
- Type: bugfix
- ID:NA