Commit graph

42 commits

Author SHA1 Message Date
Nikita Popov
7a17ad9967 Only ship libclang* in clang-libs
Previously we were also shipping libLLVM* and libLLD*.
2024-09-02 15:45:30 +02:00
Tulio Magno Quites Machado Filho
3c82b12f11 Add subpackage llvm-toolset
Related: RHEL-45729
2024-09-02 15:45:30 +02:00
Konrad Kleine
40d89f6009 Include liblldb*.so in %files
See
https://src.fedoraproject.org/rpms/llvm/pull-request/234#comment-206914
2024-09-02 15:45:30 +02:00
Konrad Kleine
572039ea86 Add lldb to big-merge
See https://github.com/fedora-llvm-team/llvm-snapshots/issues/573
2024-09-02 15:45:30 +02:00
Nikita Popov
c0d6e6d162 Only put libLLVM*.a into llvm-static
Currently we also accidentally ship libomptarget.devicertl.a.
2024-09-02 15:45:30 +02:00
Tom Stellard
102959aa2f Add directory ownership for libomp cmake dir 2024-09-02 15:45:30 +02:00
Nikita Popov
481c78feb0 Ship .ninja_log in llvm-build-stats package
This should make it easier to analyze which parts of the build
are slow. The new package is only available in snapshot builds,
we don't want to ship it in production.
2024-09-02 15:45:30 +02:00
Nikita Popov
4fea24b487 Remove 32-bit arm related conditionals
32-bit ARM hasn't been supported for quite a while, remove the
related conditions. This has already happened for the non-big-merge
branches.
2024-09-02 15:45:30 +02:00
Nikita Popov
388833f3d8 Add new reduce-chunk-list binary
Added in https://github.com/llvm/llvm-project/pull/89470.
2024-09-02 15:45:30 +02:00
Nikita Popov
8794e47395 Exclude hwasan_symbolize on i686 2024-09-02 15:45:30 +02:00
Nikita Popov
9e875aeb6a Add i686 -> i386 compiler-rt symlink
This ports the change from https://src.fedoraproject.org/rpms/compiler-rt/pull-request/67
to big-merge, which is a bit more complicated here due to the
explicit file lists.

By default compiler_rt_triple is the same as llvm_triple. For x86
it is i386-redhat-linux-gnu instead, with a symlink to the
llvm_triple i686-redhat-linux-gnu.

And then the file list also needs to ship that symlink.
2024-09-02 15:45:30 +02:00
Nikita Popov
99dd05a90b Remove fedora 38 related workarounds
This chroot is no longer supported on copr.
2024-09-02 15:45:30 +02:00
Nikita Popov
c422c5daf7 More fixes for file lists
Fix these errors on s390x by excluding the files on that arch:

    File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/clang_rt.crtbegin.o
    File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/clang_rt.crtend.o
    File not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.s390x/usr/lib/clang/19/lib/s390x-redhat-linux-gnu/liborc_rt.a

Fix this error on i686 by explicitly creating the directory.
This matches what the implementation did pre-big-merge. I think
we do want to keep this directory structure consistent across all
arches.

    Directory not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240526.gc87a7b3bdb6737-1.fc41.i386/usr/lib/clang/19/bin
2024-09-02 15:45:30 +02:00
Nikita Popov
c954f67bf3 Use wildcard for sanitizer ignore/abi lists
The list of supported sanitizers differs per target, and depending
on that some of these files may or may not be present. Use a
wildcard rather than explicitly listing this out.
2024-09-02 15:45:30 +02:00
Nikita Popov
9dcea4c065 Use wildcard for libclang_rt libraries
https://github.com/llvm/llvm-project/pull/92456 added a new
libclang_rt.ctx_profile.a library.

Given that these all have a fixed prefix, I think it's fine to
use a wildcard for them instead of explicitly listing them.
2024-09-02 15:45:30 +02:00
Konrad Kleine
7f11df8554 Fixup File listed twice warning:
This is a fixup for 66fec669b9.

This fixes these RPM build warnings about cmake files being listed twice.

```
RPM build warnings:
    File listed twice: /usr/lib64/cmake/clang/AddClang.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake
    File listed twice:
/usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake
/usr/share/clang/clang-format-ddiff.py
    File listed twice: /usr/lib64/cmake/clang/AddClang.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake
    File listed twice:
/usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake
/usr/share/clang/clang-format-diff.py
```
2024-09-02 15:45:30 +02:00
Konrad Kleine
175bb38072 Avoid listing files twice
This should solve this warning:

```
RPM build warnings:
    File listed twice: /usr/lib64/cmake/clang/AddClang.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfig.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangConfigVersion.cmake
    File listed twice:
/usr/lib64/cmake/clang/ClangTargets-relwithdebinfo.cmake
    File listed twice: /usr/lib64/cmake/clang/ClangTargets.cmake
    absolute symlink: /usr/bin/clang-format-diff ->
/usr/share/clang/clang-format-diff.py
    File listed twice:
/usr/lib/clang/19/include/fuzzer/FuzzedDataProvider.h
    File listed twice: /usr/lib/clang/19/include/orc/c_api.h
    File listed twice:
/usr/lib/clang/19/include/profile/InstrProfData.inc
    File listed twice:
/usr/lib/clang/19/include/profile/instr_prof_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/allocator_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/asan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/common_interface_defs.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/coverage_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/dfsan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/hwasan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/linux_syscall_hooks.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/lsan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/memprof_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/msan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/netbsd_syscall_hooks.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/scudo_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/tsan_interface.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/tsan_interface_atomic.h
    File listed twice:
/usr/lib/clang/19/include/sanitizer/ubsan_interface.h
    File listed twice: /usr/lib/clang/19/include/xray/xray_interface.h
    File listed twice:
/usr/lib/clang/19/include/xray/xray_log_interface.h
    File listed twice: /usr/lib/clang/19/include/xray/xray_records.h
    File listed twice: /usr/lib/clang/19/share/asan_ignorelist.txt
    File listed twice: /usr/lib/clang/19/share/cfi_ignorelist.txt
```
2024-09-02 15:45:30 +02:00
Konrad Kleine
4b4f352af9 List compiler-rt files
Before I've used `%ifnarch` in the `<FILE>` included with `%files -f <FILE>`.
This produced this error:

```
RPM build errors:
    File must begin with "/": %ifnarch
    File must begin with "/": i386
    File must begin with "/": i486
    File must begin with "/": i586
    File must begin with "/": i686
    File must begin with "/": pentium3
    File must begin with "/": pentium4
    File must begin with "/": athlon
    File must begin with "/": geode
    File must begin with "/": %endif
```

We can optimize this at any point in time later.
2024-09-02 15:45:30 +02:00
Konrad Kleine
59e5d63363 Add triple prefix to clang config files
See https://src.fedoraproject.org/rpms/clang/pull-request/240
2024-09-02 15:45:30 +02:00
Konrad Kleine
8188d9bb02 Remove OMP SOs
The SOs are no longer installed since this commit:
fa9e90f5d2
2024-09-02 15:45:30 +02:00
Konrad Kleine
c445e81a3f Fix path to files.compiler-rt.spec.inc 2024-09-02 15:45:30 +02:00
Konrad Kleine
a5fb671bd5 Remove package libomp-tools
We don't want to package it for RHEL, so we remove it here as well.
2024-09-02 15:45:30 +02:00
Konrad Kleine
259e484bb3 Leave note for lld compat packaging 2024-09-02 15:45:30 +02:00
Konrad Kleine
3bebfe7be5 Manually associate files with compiler-rt 2024-09-02 15:45:30 +02:00
Konrad Kleine
d146c76d57 Add cmake files explicitly to clang-devel 2024-09-02 15:45:30 +02:00
Konrad Kleine
8e6b7baa6d Add *.so libraries explicitly for clang-devel
We had too many `*.so` libraries added to the `clang-devel` package.

Before we've added these implicitly by accident:

```
/usr/lib64/libLLVM.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libLTO.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libRemarks.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libclang-cpp.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libclang.so.19.0.0pre20240509.g943617d12ccbd3
/usr/lib64/libclang.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldCOFF.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldCommon.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldELF.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldMachO.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldMinGW.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/liblldWasm.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libomptarget.rtl.amdgpu.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libomptarget.rtl.cuda.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libomptarget.rtl.host.so.19.0pre20240509.g943617d12ccbd3
/usr/lib64/libomptarget.so.19.0pre20240509.g943617d12ccbd3
```

And now we're adding just these because these are the ones that used to
exist within the clang-devel package when it was still being built in
standalone mode:

```
/usr/lib64/libclang-cpp.so
/usr/lib64/libclang.so
```
2024-09-02 15:45:30 +02:00
Konrad Kleine
24e78f177d Add /usr/share/man/man1/extraclangtools.1.gz to clang-tools-extra 2024-09-02 15:45:30 +02:00
Konrad Kleine
2081339380 List %license for each sub-package 2024-09-02 15:45:30 +02:00
Konrad Kleine
9824dd05a0 Add libomp-tools package
This is to host these files which were installed but previously went
unpackaged:

```
/usr/bin/llvm-omp-device-info
/usr/bin/llvm-omp-kernel-replay
```
2024-09-02 15:45:30 +02:00
Konrad Kleine
f3763ad711 Manually list binaries and manpages files for the llvm package 2024-09-02 15:45:30 +02:00
Konrad Kleine
2ce72cec81 Use LICENSE.TXT file from lld directory 2024-09-02 15:45:30 +02:00
Konrad Kleine
316c5488a7 Integrate lld.spec into spec files 2024-09-02 15:45:30 +02:00
Tom Stellard
e35aa06353 Fix missing directory on ppc64le 2024-09-02 15:45:30 +02:00
Tom Stellard
05c4d67421 Fix libomptarget.rtl name after 72b0c11cfd267b754076dfc2908ba921c4f69ee3 2024-09-02 15:45:30 +02:00
Tom Stellard
eecdbeec91 Fix libomptarget.rtl name after 72b0c11cfd267b754076dfc2908ba921c4f69ee3 2024-09-02 15:45:30 +02:00
Tom Stellard
360173b9d6 Revert "Fix file path on all arches"
This reverts commit 0d6602437c40f2a0d2714fbaeebf3d851017c627.
2024-09-02 15:45:30 +02:00
Tom Stellard
271e096f43 Fix file path on all arches 2024-09-02 15:45:30 +02:00
Tom Stellard
0ef81ed402 Fix missing file on i686 2024-09-02 15:45:30 +02:00
Tom Stellard
97ee1828d7 Sync with clang upstream-snapshot branch 2024-09-02 15:45:30 +02:00
Tom Stellard
6d22898f33 Sync with llvm upstream-snapshot branch 2024-09-02 15:45:30 +02:00
Nikita Popov
d0e5867bd7 Restore DWARF 4 config file for Fedora 38
This is a port of 74b8bb0397
2024-09-02 15:45:17 +02:00
Konrad Kleine
ab194f104b merge llvm, clang, compiler-rt and libomp repos
* %check: export LD_LIBRARY_PATH because runtimes use external cmake projects that wouldn't find libclang++.so
* %check: use LLVM's LIT_XFAIL to mark tests that are expected to fail and don't just delete them
* clang: bring over *.patch files
* clang: remove build requires tags from clang package that are already defined by main llvm package
* clang: remove duplicates found in llvm globals and use %{pkg_datadir} instead of %{install_datadir}
* clang: rename and use pkg_name -> pkg_name_clang
* clang: use %{pkg_name_clang} instead of %{name}
* compiler-rt and libomp: wrap in %if %{without compat_build}
* libomp: also build libomp for s390x (See https://github.com/llvm/llvm-project/pull/66081)
* libomp: exclude libomp-devel on s390x just like libomp itself
* libomp: introduce pkg_name_libomp and cleanup the globals
* libomp: remove gdb-plugin (NEED TO CONFIRM IF THIS IS REALLY TRUE)
* libomp: filter out flaky libomp test: ompt/teams/distribute_dispatch.c
* llvm: add BuildRequires: graphviz to llvm-doc
* llvm: use %{pkg_name_llvm} instead of %{name}
* make: added temporary Makefile so I can more easily run srpm or rpm builds locally
* make: Added local-tmt-vm target (not really useful yet)
* rpm: for non-RHEL add prefix like "Jan 05 16:17:06" to every log line This should help in finding out how long things take to build/install/...
* rpm: fully specify %files for top-level packages
* rpm: make all packages fully qualified
* rpm: obsolete llvm-snapshot-builder
* rpm: remove BuildRequires: python3-lit because we have it in-tree
* rpm: remove BuildRequires: tags for clang and llvm specifics as we're building in-tree
* rpm: rename %llvm_srcdir -> %srcdir_llvm
* rpm: rename %pkg_name -> %pkg_name_llvm
* rpm: use full qualified name in %description
* rpm: use region comments in spec file to group by package. This allows editors to fold text to get a better overview
* rpmlint: update rc file to reflect clang and compiler-rt (libomp has no rpmlint rc file)
* use python-lit from within tree
2024-09-02 15:45:17 +02:00