mirror of
https://src.fedoraproject.org/rpms/llvm.git
synced 2024-11-24 09:32:42 +00:00
Disable python-lit and lldb for compat builds
This commit is contained in:
parent
b6b17b013e
commit
1e0387cf85
6 changed files with 34 additions and 3 deletions
|
@ -12,6 +12,11 @@
|
|||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
||||
%global projects clang;clang-tools-extra;lld
|
||||
%if %{with lldb}
|
||||
%global projects %{projects};lldb
|
||||
%endif
|
||||
|
||||
# Copy CFLAGS into ASMFLAGS, so -fcf-protection is used when compiling assembly files.
|
||||
export ASMFLAGS="%{build_cflags}"
|
||||
|
||||
|
@ -32,9 +37,11 @@ export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:`pwd`/llvm/%{_vpath_builddir}/%{_lib}
|
|||
cd llvm
|
||||
|
||||
#region LLVM lit
|
||||
%if %{with python_lit}
|
||||
pushd utils/lit
|
||||
%py3_build
|
||||
popd
|
||||
%endif
|
||||
#endregion
|
||||
|
||||
%if 0%{?rhel} == 8
|
||||
|
@ -47,7 +54,7 @@ popd
|
|||
# TODO: Override LIBOMP_INSTALL_LIBDIR, because otherwise the libraries
|
||||
# are installed to /usr/lib64/$TRIPLE and clang can't find them.
|
||||
%cmake -G Ninja \
|
||||
-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb" \
|
||||
-DLLVM_ENABLE_PROJECTS="%{projects}" \
|
||||
\
|
||||
\
|
||||
-DCLANG_DEFAULT_PIE_ON_LINUX=OFF \
|
||||
|
@ -196,6 +203,7 @@ popd
|
|||
\
|
||||
\
|
||||
\
|
||||
%if %{with lldb}
|
||||
-DLLDB_DISABLE_CURSES:BOOL=OFF \
|
||||
-DLLDB_DISABLE_LIBEDIT:BOOL=OFF \
|
||||
-DLLDB_DISABLE_PYTHON:BOOL=OFF \
|
||||
|
@ -203,6 +211,7 @@ popd
|
|||
-DLLDB_TEST_USER_ARGS=--skip-category=watchpoint \
|
||||
%endif
|
||||
-DLLDB_ENFORCE_STRICT_TEST_REQUIREMENTS:BOOL=ON \
|
||||
%endif
|
||||
\
|
||||
\
|
||||
\
|
||||
|
|
|
@ -70,6 +70,7 @@ function test_list_to_regex()
|
|||
#endregion
|
||||
|
||||
#region Test LLVM lit
|
||||
# It's fine to always run this, even if we're not shipping python-lit.
|
||||
reset_test_opts
|
||||
%cmake_build --target check-lit
|
||||
#endregion
|
||||
|
@ -249,6 +250,7 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
|||
%cmake_build --target check-openmp
|
||||
#endregion
|
||||
|
||||
%if %{with lldb}
|
||||
# Don't run LLDB tests on s390x because more than 150 tests are failing there
|
||||
%ifnarch s390x
|
||||
## TODO(kkleine): Come back and re-enable testing for LLDB
|
||||
|
@ -267,6 +269,7 @@ export LIT_FILTER_OUT=$(test_list_to_regex test_list_filter_out)
|
|||
## %%cmake_build --target check-lldb-shell
|
||||
## #endregion
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
#region Test LLD
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
#region LLVM lit files
|
||||
%if %{with python_lit}
|
||||
%files -n python3-lit
|
||||
%license llvm/utils/lit/LICENSE.TXT
|
||||
%doc llvm/utils/lit/README.rst
|
||||
%{python3_sitelib}/lit/
|
||||
%{python3_sitelib}/lit-*-info/
|
||||
%{_bindir}/lit
|
||||
%endif
|
||||
#endregion
|
||||
|
||||
#region LLVM files
|
||||
|
@ -632,6 +634,7 @@
|
|||
#endregion
|
||||
|
||||
#region LLDB files
|
||||
%if %{with lldb}
|
||||
%files -n %{pkg_name_lldb}
|
||||
%license lldb/LICENSE.TXT
|
||||
%{install_bindir}/lldb*
|
||||
|
@ -646,4 +649,5 @@
|
|||
|
||||
%files -n python3-lldb
|
||||
%{python3_sitearch}/lldb
|
||||
%endif
|
||||
#endregion
|
||||
|
|
|
@ -8,6 +8,15 @@
|
|||
%bcond_with compat_build
|
||||
%bcond_without check
|
||||
|
||||
# Compat builds do not include python-lit and lldb
|
||||
%if %{with compat_build}
|
||||
%bcond_with python_lit
|
||||
%bcond_with lldb
|
||||
%else
|
||||
%bcond_without python_lit
|
||||
%bcond_without lldb
|
||||
%endif
|
||||
|
||||
# Disable LTO on x86 and riscv in order to reduce memory consumption.
|
||||
%ifarch %ix86 riscv64
|
||||
%bcond_with lto_build
|
||||
|
|
|
@ -2,12 +2,14 @@
|
|||
|
||||
pushd llvm
|
||||
|
||||
%if %{with python_lit}
|
||||
pushd utils/lit
|
||||
%py3_install
|
||||
|
||||
# Strip out #!/usr/bin/env python
|
||||
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/lit/*.py
|
||||
popd
|
||||
%endif
|
||||
|
||||
%cmake_install
|
||||
|
||||
|
@ -286,6 +288,7 @@ fi
|
|||
#endregion
|
||||
|
||||
#region LLDB installation
|
||||
%if %{with lldb}
|
||||
%multilib_fix_c_header --file %{install_includedir}/lldb/Host/Config.h
|
||||
|
||||
# remove static libraries
|
||||
|
@ -298,4 +301,5 @@ ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
|
|||
|
||||
# remove bundled six.py
|
||||
rm -f %{buildroot}%{python3_sitearch}/six.*
|
||||
%endif
|
||||
#endregion
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#region LLVM lit package
|
||||
%if %{with python_lit}
|
||||
%package -n python3-lit
|
||||
Summary: LLVM lit test runner for Python 3
|
||||
|
||||
|
@ -8,6 +9,7 @@ Recommends: python3-psutil
|
|||
|
||||
%description -n python3-lit
|
||||
lit is a tool used by the LLVM project for executing its test suites.
|
||||
%endif
|
||||
#endregion
|
||||
|
||||
#region LLVM packages
|
||||
|
@ -322,7 +324,7 @@ This is the main package for llvm-toolset.
|
|||
#endregion
|
||||
|
||||
#region LLDB packages
|
||||
|
||||
%if %{with lldb}
|
||||
%package -n %{pkg_name_lldb}
|
||||
Summary: Next generation high-performance debugger
|
||||
License: Apache-2.0 WITH LLVM-exception OR NCSA
|
||||
|
@ -352,5 +354,5 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release}
|
|||
|
||||
%description -n python3-lldb
|
||||
The package contains the LLDB Python module.
|
||||
|
||||
%endif
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue