diff --git a/llvm.spec b/llvm.spec index 4d52621..089fa28 100644 --- a/llvm.spec +++ b/llvm.spec @@ -61,6 +61,12 @@ %global gts_version 14 %endif +%if %{defined rhel} && 0%{?rhel} <= 8 +%bcond_with libedit +%else +%bcond_without libedit +%endif + # Opt out of https://fedoraproject.org/wiki/Changes/fno-omit-frame-pointer # https://bugzilla.redhat.com/show_bug.cgi?id=2158587 %undefine _include_frame_pointers @@ -318,8 +324,10 @@ BuildRequires: binutils-gold # Enable extra functionality when run the LLVM JIT under valgrind. BuildRequires: valgrind-devel %endif +%if %{with libedit} # LLVM's LineEditor library will use libedit if it is available. BuildRequires: libedit-devel +%endif # We need python3-devel for %%py3_shebang_fix BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools