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