!13 adopt to new cmake macro

From: @fundawang 
Reviewed-by: @liyunfei33 
Signed-off-by: @liyunfei33
This commit is contained in:
openeuler-ci-bot 2024-11-12 12:53:54 +00:00 committed by Gitee
commit c0aa6307a6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,3 +1,5 @@
%undefine __cmake_in_source_build
%bcond_without sys_llvm %bcond_without sys_llvm
%bcond_without check %bcond_without check
%bcond_without toolchain_clang %bcond_without toolchain_clang
@ -39,7 +41,7 @@
Name: %{pkg_name} Name: %{pkg_name}
Version: %{libcxx_version} Version: %{libcxx_version}
Release: 3%{?dist} Release: 4
Summary: LLVM "libcxx" runtime libraries Summary: LLVM "libcxx" runtime libraries
License: Apache-2.0 License: Apache-2.0
URL: http://llvm.org URL: http://llvm.org
@ -160,8 +162,6 @@ cp ../%{runtimes_cmakedir}/WarningFlags.cmake runtimes/cmake/Modules/
#%py3_shebang_fix libcxx/utils/ #%py3_shebang_fix libcxx/utils/
%build %build
mkdir -p _build
cd _build
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files. # Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
export ASMFLAGS=$CFLA export ASMFLAGS=$CFLA
@ -189,14 +189,11 @@ export ASMFLAGS=$CFLA
%if %{with bisheng_autotuner} %if %{with bisheng_autotuner}
-DLLVM_ENABLE_AUTOTUNER=ON \ -DLLVM_ENABLE_AUTOTUNER=ON \
%endif %endif
..
%ninja_build %cmake_build
%install %install
cd _build %cmake_install
%ninja_install
# We can't install the unversionned path on default location because that would conflict with # We can't install the unversionned path on default location because that would conflict with
# https://src.fedoraproject.org/rpms/libunwind # https://src.fedoraproject.org/rpms/libunwind
# #
@ -214,7 +211,6 @@ popd
rm %{buildroot}%{_pkgdocdir}/html/.buildinfo rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
%ldconfig_scriptlets
%files %files
%license libcxx/LICENSE.TXT %license libcxx/LICENSE.TXT
%doc libcxx/CREDITS.TXT libcxx/TODO.TXT %doc libcxx/CREDITS.TXT libcxx/TODO.TXT
@ -269,6 +265,10 @@ rm %{buildroot}%{_pkgdocdir}/html/.buildinfo
%doc %{_pkgdocdir}/html %doc %{_pkgdocdir}/html
%changelog %changelog
* Thu Nov 07 2024 Funda Wang <fundawang@yeah.net> - 17.0.6-4
- adopt to new cmake macro
- force out-of-source build
* Tue Aug 20 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-3 * Tue Aug 20 2024 liyunfei <liyunfei33@huawei.com> - 17.0.6-3
- Add BiSheng Autotuner support. - Add BiSheng Autotuner support.