Commit graph

839 commits

Author SHA1 Message Date
Konrad Kleine
af1c7f6599 lldb: fix ModuleNotFoundError: No module named 'pexpect'
We've seen a lot of tests that were missing the pexpect python module
and that resulted in a state of
[`UNRESOLVED`](https://llvm.org/docs/CommandGuide/lit.html).
2024-09-02 15:45:30 +02:00
Konrad Kleine
a3b9c83bd0 Remove timestamp prefix in log lines
With the llvm-build-stats we have what we wanted.
2024-09-02 15:45:30 +02:00
Konrad Kleine
67ad348eff lld: move ldconfig_scriptlets into llvm.spec 2024-09-02 15:45:30 +02:00
Konrad Kleine
d2784c597d lldb: add BuildRequires: procps-ng
This is to mitigate `/bin/sh: line 1: ps: command not found` in the
build logs.
2024-09-02 15:45:30 +02:00
Konrad Kleine
ed43018924 Reorganize %check section 2024-09-02 15:45:30 +02:00
Nikita Popov
c59ccd7302 Remove compact_unwind_encoding.h patch
This is no longer necessary now that we're building from the monorepo.
2024-09-02 15:45:30 +02:00
Nikita Popov
9a3a566d6c Fix python3-clang
Drop confusing `cd ..` so we stay in the root of the LLVM sources
and the install command succeeds.
2024-09-02 15:45:30 +02:00
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
d8be89d90c Add another flaky lldb test to exclude list
This test seems flaky:

lldb-api :: functionalities/fork/concurrent_vfork/TestConcurrentVFork.py
2024-09-02 15:45:30 +02:00
Konrad Kleine
f474b07a47 Makefile fixes
We can prefetch the sources using spectool as usual.
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
d06b46b724 Move all BuildRequires: tags to llvm.spec
See
https://src.fedoraproject.org/rpms/llvm/pull-request/234#comment-206917
2024-09-02 15:45:30 +02:00
Konrad Kleine
2fdbeecccd Remove %ldconfig_scriptlets and remove liblldb*.a files 2024-09-02 15:45:30 +02:00
Konrad Kleine
bbf0c012f8 Don't clean after building the RPM 2024-09-02 15:45:30 +02:00
Konrad Kleine
51b8ad136c Filter out flaky, unresolved and broken lldb test 2024-09-02 15:45:30 +02:00
Konrad Kleine
c89b2b03b0 Avoid building lldb docs
This should fix this error:

```
Jul 01 12:48:27 FAILED: tools/lldb/docs/CMakeFiles/docs-lldb-html
/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/CMakeFiles/docs-lldb-html
Jul 01 12:48:27 cd
/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs
&& /usr/bin/cmake -E env
LLDB_SWIG_MODULE=/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs
/usr/bin/sphinx-build-3 -b html -d
/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/_doctrees-lldb-html
-q -t builder-html -D version=19 -D release=mainline
/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/lldb/docs
/home/fedora/src/llvm-rpms/llvm-big-merge/BUILD/llvm-project-e19ac0dcfd7357161210f157ed0559836e88155f/llvm/redhat-linux-build/tools/lldb/docs/html
Jul 01 12:48:27
Jul 01 12:48:27 Extension error:
Jul 01 12:48:27 Could not import extension sphinx_automodapi.automodapi
(exception: No module named 'sphinx_automodapi')
Jul 01 12:48:27 install sphinx_automodapi with /usr/bin/python3 -m pip
install sphinx_automodapi
Jul 01 12:48:27 install sphinx furo theme with /usr/bin/python3 -m pip
install furo
```

the two python modules are not in fedroa unfortunately.
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
Konrad Kleine
52ba00adbd Add lldb.spec from which we integrate 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
Konrad Kleine
abc6958daf Fix lit filtering
I forgot to add the 'g' modifier to sed. Before only the first occurence
of a '.' was replaced in a path and not every dot.
2024-09-02 15:45:30 +02:00
Konrad Kleine
5d65390bed Remove HTML asset files from /usr/share/clang-doc
In https://github.com/fedora-llvm-team/llvm-snapshots/issues/564#issuecomment-2191023635
we noticed that `clang-doc-default-stylesheet.css` and `index.js` are no
longer installed to `/usr/share/clang` but `/usr/share/clang-doc`
instead. This addresses the [change in upstream](https://github.com/llvm/llvm-project/pull/96555).
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
Konrad Kleine
d786a89a64 Format all files with 'pre-commit run -a' 2024-09-02 15:45:30 +02:00
Konrad Kleine
f67a3015ee Add pre-commit 2024-09-02 15:45:30 +02:00
Tom Stellard
766f32331f Build libclang-cpp.so separately to avoid OOM errors
We were running out of memory linking this on the ppc64le COPR builders.
2024-09-02 15:45:30 +02:00
Nikita Popov
4db7fe1bea Rebase LLD patch 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
c14e5cf088 Fix clang resource directory path
The clang resource directory is always in lib/, while this was
creating the directories in lib64 (for 64-bit symbols).

This should fix the following error on ppc64le:

> error: Directory not found: /builddir/build/BUILDROOT/llvm-19.0.0~pre20240528.g1de1ee9cbabd64-1.fc39.ppc64le/usr/lib/clang/19/bin
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
1115746e65 Make lto handling similar to current rawhide
Have a --with lto_build option, where LTO is enabled by default
for everything except i686 and riscv. Use that flag to condition
whether `-DLLVM_UNITTEST_LINK_FLAGS` is passed.

Additionally, make use of the new Fat LTO functionality in rawhide
to use `-fno-lto` instead of `-Wl,-plugin-opt=O0` to save more
time linking unit tests.
2024-09-02 15:45:30 +02:00
Nikita Popov
3ddc01eec2 Clean up the lto_cflags mess
We were defining lto_cflags in three places. It looks like on
aarch64 nil won (LTO disabled), while on other architectures
`-flto=thin` won.

I think on rawhide, this means that we're currently shipping
bitcode in static archives, because the required
`-ffat-lto-objects` option from redhat-rpm-config is missing.

Resolve this by leaving the option at its default value --
if enabling it on aarch64 causes issues, we can disable it just
there again.

Also reenable the LLVM_UNITTEST_LINK_FLAGS option, which should
reduce the amount of time LTO takes.
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
06767d80d8 Fix i386 build
These binaries are not created on i386, so don't try to remove
them. Alternatively could use rm -f.
2024-09-02 15:45:30 +02:00
Konrad Kleine
bee7a61730 Fix ModuleNotFoundError: No module named 'myst_parser'
This should fix this error which appears on RHEL only:

```
Configuration error:
There is a programmable error in your configuration file:

Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/sphinx/config.py", line 326, in eval_config_file
    execfile_(filename, namespace)
  File "/usr/lib/python3.9/site-packages/sphinx/util/pycompat.py", line 88, in execfile_
    exec(code, _globals)
  File "/builddir/build/BUILD/llvm-project-c1d5cc99c6ba8e897ea145dbb2221a155b5e3e5a/llvm/redhat-linux-build/tools/clang/docs/conf.py", line 42, in <module>
    import myst_parser
ModuleNotFoundError: No module named 'myst_parser'
```

See also https://github.com/fedora-llvm-team/llvm-snapshots/issues/492
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
Tulio Magno Quites Machado Filho
1846c73b59 Fix rhbz #2248872
Ensure the versioned llvm-config alternative gets removed during major
upgrades of the non-compat package.

Also add code that removes the versioned llvm-config alternatives of
the previous 3 LLVM versions. These versions didn't remove their own
versioned llvm-config alternative, leading to broken output, e.g.
llvm-config-16 points to llvm-config-64 from LLVM 17.
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
34c048f35a make: Remove LTO objects when cleaning 2024-09-02 15:45:30 +02:00
Konrad Kleine
fc801cc563 Remove no longer used %llvm_snapshot_source_prefix macro 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
29f8ae58c1 Fix paths for compiler-rt files 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