diff --git a/README.en.md b/README.en.md index ea0e7d458abbb5156a4e8fc94ed4e82bbabba389..c2a5f8e9b570381bd836db6a410fc622c6ebe21b 100644 --- a/README.en.md +++ b/README.en.md @@ -1,8 +1,24 @@ -# lldb +# lldb-latest #### Description -The LLDB project builds on libraries provided by LLVM and Clang to provide a great native debugger. It uses the Clang ASTs and expression parser, LLVM JIT, LLVM disassembler, etc so that it provides an experience that "just works". It is also blazing fast and much more memory efficient than GDB at loading symbols. +Next generation high-performance debugger +#### Software Architecture +Software architecture description + +#### Installation + +1. xxxx +2. xxxx +3. xxxx + +#### Instructions + +1. xxxx +2. xxxx +3. xxxx + +#### Contribution 1. Fork the repository 2. Create Feat_xxx branch diff --git a/README.md b/README.md index 5dac5b963aa270f5e33c05c5c909eaa4b931d065..257efeb716cf0170ce7add2ff7d2ce8a8513bd0b 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,23 @@ -# lldb +# lldb-latest #### 介绍 -The LLDB project builds on libraries provided by LLVM and Clang to provide a great native debugger. It uses the Clang ASTs and expression parser, LLVM JIT, LLVM disassembler, etc so that it provides an experience that "just works". It is also blazing fast and much more memory efficient than GDB at loading symbols. +Next generation high-performance debugger + +#### 软件架构 +软件架构说明 + + +#### 安装教程 + +1. xxxx +2. xxxx +3. xxxx + +#### 使用说明 + +1. xxxx +2. xxxx +3. xxxx #### 参与贡献 @@ -11,11 +27,11 @@ The LLDB project builds on libraries provided by LLVM and Clang to provide a gre 4. 新建 Pull Request -#### 码云特技 +#### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目 -5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) +3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 +4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 +5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) +6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/lldb-17.0.6.src.tar.xz b/lldb-18.1.8.src.tar.xz similarity index 56% rename from lldb-17.0.6.src.tar.xz rename to lldb-18.1.8.src.tar.xz index c8a129a6fbd07cff3c125fb0b41630520b81881d..812573ba4a6e5ce740e94043a210ff85f4ee321d 100644 Binary files a/lldb-17.0.6.src.tar.xz and b/lldb-18.1.8.src.tar.xz differ diff --git a/lldb.spec b/lldb.spec index 46e88f4c7f0f680672f0443775fdaffad81c8fe7..b2fff470497fa7b6101839c74b736f6c6e684caf 100644 --- a/lldb.spec +++ b/lldb.spec @@ -1,34 +1,64 @@ -%undefine __cmake_in_source_build -%bcond_without bisheng_autotuner +%bcond_without toolchain_clang -Name: lldb -Version: 17.0.6 -Release: 3 +%if %{with toolchain_clang} +%global toolchain clang +%endif + +%global maj_ver 18 +%global min_ver 1 +%global patch_ver 8 +%global lldb_version %{maj_ver}.%{min_ver}.%{patch_ver} + +%global _scl_prefix /opt/openEuler +%{?scl:%scl_package %scl} +%{!?scl:%global scl_prefix llvm-toolset-%{maj_ver}-} +%{!?scl:%global pkg_name %{name}} +%global install_prefix %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_prefix} +%global install_datadir %{!?scl:%{_scl_prefix}/llvm-toolset-%{maj_ver}/root}%{_datadir} + +%global install_bindir %{install_prefix}/bin +%global install_includedir %{install_prefix}/include +%if 0%{?__isa_bits} == 64 +%global install_libdir %{install_prefix}/lib64 +%else +%global install_libdir %{install_prefix}/lib +%endif +%global install_libexecdir %{install_prefix}/libexec +%global install_sharedir %{install_prefix}/share +%global install_docdir %{install_sharedir}/doc + +Name: %{?scl_prefix}lldb +Version: %{lldb_version} +Release: 1 Summary: Next generation high-performance debugger License: NCSA URL: http://lldb.llvm.org/ -Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{name}-%{version}.src.tar.xz +Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/lldb-%{version}.src.tar.xz BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake -BuildRequires: clang -BuildRequires: llvm-devel = %{version} -BuildRequires: llvm-test = %{version} -BuildRequires: clang-devel = %{version} -BuildRequires: clang-tools-extra = %{version} +BuildRequires: ninja-build +BuildRequires: %{?scl_prefix}clang +BuildRequires: %{?scl_prefix}llvm-devel = %{version} +BuildRequires: %{?scl_prefix}llvm-test = %{version} +BuildRequires: %{?scl_prefix}clang-devel = %{version} +BuildRequires: %{?scl_prefix}clang-tools-extra = %{version} BuildRequires: ncurses-devel BuildRequires: swig -BuildRequires: llvm-static = %{version} +BuildRequires: %{?scl_prefix}llvm-static = %{version} BuildRequires: libffi-devel BuildRequires: zlib-devel BuildRequires: libxml2-devel BuildRequires: libedit-devel BuildRequires: python3-lit BuildRequires: multilib-rpm-config +%if %{with toolchain_clang} +BuildRequires: clang +%endif -Requires: python3-lldb +Requires: %{?scl_prefix}python3-lldb %description LLDB is a next generation, high-performance debugger. It is built as a set @@ -38,35 +68,40 @@ disassembler. %package devel Summary: Development header files for LLDB -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{pkg_name}%{?_isa} = %{version}-%{release} %description devel The package contains header files for the LLDB debugger. -%package -n python3-lldb +%package -n %{?scl_prefix}python3-lldb %{?python_provide:%python_provide python3-lldb} Summary: Python module for LLDB BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-six -Requires: %{name}%{?_isa} = %{version}-%{release} -BuildRequires: llvm-cmake-utils = %{version} +Requires: %{pkg_name}%{?_isa} = %{version}-%{release} +BuildRequires: %{?scl_prefix}llvm-cmake-utils = %{version} -%description -n python3-lldb +%description -n %{?scl_prefix}python3-lldb The package contains the LLDB Python module. %prep -%autosetup -n %{name}-%{version}.src -p2 +%autosetup -n lldb-%{version}.src -p2 %build # Python version detection is broken -LDFLAGS="%{build_ldflags} -lpthread -ldl" +LDFLAGS="%{__global_ldflags} -lpthread -ldl" CFLAGS="%{optflags} -Wno-error=format-security" CXXFLAGS="%{optflags} -Wno-error=format-security" -%cmake \ +mkdir -p _build +cd _build +%cmake .. \ + -DCMAKE_INSTALL_PREFIX=%{install_prefix} \ + -DLLVM_COMMON_CMAKE_UTILS=%{install_datadir}/llvm/cmake \ + -DLLVM_MAIN_SRC_DIR=%{install_prefix}/src \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_SKIP_RPATH:BOOL=ON \ -DLLVM_LINK_LLVM_DYLIB:BOOL=ON \ @@ -75,13 +110,14 @@ CXXFLAGS="%{optflags} -Wno-error=format-security" -DLLDB_DISABLE_CURSES:BOOL=OFF \ -DLLDB_DISABLE_LIBEDIT:BOOL=OFF \ -DLLDB_DISABLE_PYTHON:BOOL=OFF \ +%if "%toolchain" == "clang" + -DCMAKE_C_COMPILER=clang \ + -DCMAKE_CXX_COMPILER=clang++ \ +%endif %if 0%{?__isa_bits} == 64 -DLLVM_LIBDIR_SUFFIX=64 \ %else -DLLVM_LIBDIR_SUFFIX= \ -%endif -%if %{with bisheng_autotuner} - -DLLVM_ENABLE_AUTOTUNER=ON \ %endif \ -DPYTHON_EXECUTABLE:STRING=%{__python3} \ @@ -89,40 +125,50 @@ CXXFLAGS="%{optflags} -Wno-error=format-security" -DPYTHON_VERSION_MINOR:STRING=$(%{__python3} -c "import sys; print(sys.version_info.minor)") \ -DLLVM_EXTERNAL_LIT=%{_bindir}/lit \ -DCLANG_LINK_CLANG_DYLIB=ON \ - -DLLVM_COMMON_CMAKE_UTILS=%{_datadir}/llvm/cmake \ -DLLVM_LIT_ARGS="-sv \ - --path %{_libdir}/llvm" \ + --path %{install_libdir}/llvm" \ -%cmake_build +%make_build %install -%cmake_install +cd _build +%make_install # remove static libraries -rm -fv %{buildroot}%{_libdir}/*.a +rm -fv %{buildroot}%{install_libdir}/*.a # python: fix binary libraries location -liblldb=$(basename $(readlink -e %{buildroot}%{_libdir}/liblldb.so)) +liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so)) +mkdir -p %{buildroot}%{python3_sitearch} +mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb # remove bundled six.py -rm -f %{buildroot}%{python3_sitearch}/six.* +rm -f %{buildroot}%{install_prefix}%{python3_sitearch}/six.* + +%ldconfig_scriptlets + +%check + %files %license LICENSE.TXT -%{_bindir}/lldb* -%{_libdir}/liblldb.so.* -%{_libdir}/liblldbIntelFeatures.so.* +%{install_bindir}/lldb* +%{install_libdir}/liblldb.so.* +%{install_libdir}/liblldbIntelFeatures.so.* %files devel -%{_includedir}/lldb -%{_libdir}/*.so +%{install_includedir}/lldb +%{install_libdir}/*.so -%files -n python3-lldb +%files -n %{?scl_prefix}python3-lldb %{python3_sitearch}/lldb %changelog +* Fri Dec 6 2024 liyunfei - 18.1.8-1 +- init for Multi-Version LLVM-18.1.8 + * Wed Nov 13 2024 Funda Wang - 17.0.6-3 - adopt to new cmake macro