File tree Expand file tree Collapse file tree 5 files changed +50
-2
lines changed Expand file tree Collapse file tree 5 files changed +50
-2
lines changed Original file line number Diff line number Diff line change @@ -230,3 +230,23 @@ popd
230
230
%cmake_build --target runtimes
231
231
232
232
cd ..
233
+
234
+ %if %{with bundle_compat_lib }
235
+ %cmake -S .. /llvm -project -%{compat_ver }. src /llvm -B .. /llvm -compat -libs -G Ninja \
236
+ -DCMAKE_INSTALL_PREFIX = %{buildroot }%{_libdir }/llvm %{compat_maj_ver }/ \
237
+ -DCMAKE_SKIP_RPATH = ON \
238
+ -DCMAKE_BUILD_TYPE = Release \
239
+ -DBUILD_SHARED_LIBS = OFF \
240
+ -DLLVM_BUILD_LLVM_DYLIB = ON \
241
+ -DLLVM_ENABLE_EH = ON \
242
+ -DLLVM_ENABLE_RTTI = ON \
243
+ -DLLVM_ENABLE_PROJECTS = clang \
244
+ -DLLVM_TARGETS_TO_BUILD = %{targets_to_build } \
245
+ -DLLVM_INCLUDE_BENCHMARKS = OFF \
246
+ -DLLVM_INCLUDE_TESTS = OFF
247
+
248
+ %ninja_build -C .. /llvm -compat -libs LLVM
249
+ %ninja_build -C .. /llvm -compat -libs libclang . so
250
+ %ninja_build -C .. /llvm -compat -libs libclang -cpp . so
251
+
252
+ %endif
Original file line number Diff line number Diff line change 271
271
%if %{with compat_build }
272
272
%config (noreplace ) /etc /ld . so . conf . d /%{name }-%{_arch }. conf
273
273
%endif
274
+ %if %{with bundle_compat_lib }
275
+ %{_libdir }/libLLVM . so . %{compat_maj_ver }*
276
+ %endif
274
277
275
278
%files -n %{pkg_name_llvm }-devel
276
279
%license llvm /LICENSE . TXT
364
367
%files -n %{pkg_name_clang }-libs
365
368
%license clang /LICENSE . TXT
366
369
%{_prefix }/lib /clang /%{maj_ver }/include /*
367
- %{install_libdir }/libclang . so . *
368
- %{install_libdir }/libclang -cpp . so . *
370
+ %{install_libdir }/libclang . so . %{maj_ver }*
371
+ %{install_libdir }/libclang -cpp . so . %{maj_ver }*
372
+ %if %{with bundle_compat_lib }
373
+ %{_libdir }/libclang . so . %{compat_maj_ver }*
374
+ %{_libdir }/libclang -cpp . so . %{compat_maj_ver }*
375
+ %endif
369
376
370
377
%files -n %{pkg_name_clang }-devel
371
378
%license clang /LICENSE . TXT
Original file line number Diff line number Diff line change 5
5
%else
6
6
%bcond_with gold
7
7
%endif
8
+
9
+ # Build compat packages llvmN instead of main package for the current LLVM
10
+ # version. Used on Fedora.
8
11
%bcond_with compat_build
12
+ # Bundle compat libraries for a previous LLVM version, as part of llvm-libs and
13
+ # clang-libs. Used on RHEL.
14
+ %bcond_with bundle_compat_lib
9
15
%bcond_without check
10
16
17
+ %if %{with bundle_compat_lib }
18
+ %global compat_maj_ver 18
19
+ %global compat_ver %{compat_maj_ver }.1.8
20
+ %endif
21
+
11
22
# Compat builds do not include python-lit and lldb
12
23
%if %{with compat_build }
13
24
%bcond_with python_lit
Original file line number Diff line number Diff line change @@ -269,3 +269,8 @@ rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
269
269
# ghost presence
270
270
touch %{buildroot }%{_bindir }/llvm -config %{exec_suffix }
271
271
272
+ %if %{with bundle_compat_lib }
273
+ install -m 0755 .. /llvm -compat -libs /lib /libLLVM . so . %{compat_maj_ver }* %{buildroot }%{_libdir }
274
+ install -m 0755 .. /llvm -compat -libs /lib /libclang . so . %{compat_maj_ver }* %{buildroot }%{_libdir }
275
+ install -m 0755 .. /llvm -compat -libs /lib /libclang -cpp . so . %{compat_maj_ver }* %{buildroot }%{_libdir }
276
+ %endif
Original file line number Diff line number Diff line change 3
3
%{gpgverify } --keyring = '%{SOURCE6}' --signature = '%{SOURCE1}' --data = '%{SOURCE0}'
4
4
%endif
5
5
6
+ %if %{with bundle_compat_lib }
7
+ %{gpgverify } --keyring = '%{SOURCE6}' --signature = '%{SOURCE3001}' --data = '%{SOURCE3000}'
8
+ %setup -T -q -b 3000 -n llvm -project -%{compat_ver }. src
9
+ %endif
10
+
6
11
# -T : Do Not Perform Default Archive Unpacking (without this, the <n>th source would be unpacked twice)
7
12
# -b <n> : Unpack The nth Sources Before Changing Directory
8
13
# -n : Set Name of Build Directory
You can’t perform that action at this time.
0 commit comments