Commit graph

856 commits

Author SHA1 Message Date
Nikita Popov
1612a9fa8f Explicitly list lld libraries
Otherwise we end up shipping liblldb.so and liblldbIntelFeatures.so
as part of lld-libs/lld-devel.
2024-09-02 15:45:30 +02:00
Nikita Popov
712adc2eb0 Patch back in Python 3.6 support on RHEL 8 2024-09-02 15:45:30 +02:00
Nikita Popov
7d226f4859 Fix py_byte_compile invocation 2024-09-02 15:45:30 +02:00
Nikita Popov
690b69906a Set LLVM_RAM_PER_COMPILE_JOB on RHEL 8
RHEL 8 uses gcc instead of clang as the host compiler, which
uses more memory.
2024-09-02 15:45:30 +02:00
Nikita Popov
61f67fb135 Use Python3_EXECUTABLE instead of PYTHON_EXECUTABLE
Also drop the unnecessary python version variables.

If there are multiple python versions installed, the wrong one may be
picked. PYTHON_EXECUTABLE tries to avoid that problem, but the correct
way to spell this nowadays is Python3_EXECUTABLE.
2024-09-02 15:45:30 +02:00
Nikita Popov
724af11e09 Undefine __cmake_in_source_build on RHEL 8
So we get the same behavior as in newer versions.
2024-09-02 15:45:30 +02:00
Nikita Popov
961276e5f3 Disable marshalparser on RHEL 8 2024-09-02 15:45:30 +02:00
Nikita Popov
4cca104ede Run check-clang-tools
These were lost during the big-merge migration, because they
have their own check target.

I locally confirmed that the XFAIL for i686 is still needed.
2024-09-02 15:45:30 +02:00
Nikita Popov
f631698c03 Filter out omp_collapse tests on ppc64le, s390x and i686
These tests also fail on i686: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240717/fedora-39-i386/07740274-llvm/builder-live.log.gz

And yesterday they failed on ppc64le: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240717/fedora-39-ppc64le/07740275-llvm/builder-live.log.gz

While the day before they succeeded on ppc64le.

As such, ignore them instead of marking them as xfail.
2024-09-02 15:45:30 +02:00
Konrad Kleine
6ec634c521 Remove conditions that tried to support LLVM 18 in big-merge 2024-09-02 15:45:30 +02:00
Konrad Kleine
b6c196c8a3 Remove not needed condition in version.spec.inc 2024-09-02 15:45:30 +02:00
Nikita Popov
3aac563374 Don't use wildcard for lld binaries
Otherwise we'll also ship lldb. Instead explicitly list lld and
lld-link.
2024-09-02 15:45:30 +02:00
Nikita Popov
f553e4d7d0 Don't xfail omp_collapse tests on ppc64le
The tests pass: https://download.copr.fedorainfracloud.org/results/@fedora-llvm-team/llvm-snapshots-big-merge-20240716/fedora-rawhide-ppc64le/07737001-llvm/builder-live.log.gz

The tests do fail on s390x. Note that the thread_state_{1,2}.c tests
are already part of the ppc64le exclusive xfail list above, so
we can make this one specific to s390x.
2024-09-02 15:45:30 +02:00
Nikita Popov
9552a8f6c7 Actually disable lldb tests
Make sure to use %% for macros inside comments.
2024-09-02 15:45:30 +02:00
Konrad Kleine
7f69c7ebdf Prepare non-snapshot builds
Remove version.spec.inc from git
================================

We no longer track `version.spec.inc` in git. This is useful for
development. If we build a snapshot, the file is required but if we
build a `release` build (see below), then we don't include it.

Make improvements
=================

We distinguish between `snapshot-` and `release-` builds now in the
`Makefile`. These old targets are mapped to their new counterparts and a
deprecation warning is shown:

* `setup` -> `snapshot-setup`
* `local-rpm` -> `snapshot-rpm`
* `local-srpm` -> `snapshot-srpm`
* `local-prep` -> `snapshot-prep`
* `local-clean` -> `snapshot-clean`

We also have these new Make targets that run the build process with a
release tarball instead:

* `release-setup`
* `release-rpm`
* `release-srpm`
* `release-prep`
* `release-clean`

The targets `local-list-check` and `local-tmt-vm` have been commented
out because I think they were not needed. I just kept them for future
reference of research done in those areas.

All builds described by the `Makefile` are still local and no `mock` is
involved. I find this the easiest to debug.

Toggle default bcond state for snapshot_build
=============================================

We want to be able to build non-snapshot releases with this repo. That's
why be default the build condition `snapshot_build` is off. So
only when you explicitly enable `--with=snapshot_build` or define
`--define "_with_snapshot_build 1"` you'll be able to build a snapshot.
If however the build happens in Copr with a namespace that begins with
`fedora-llvm-team/llvm-snapshots-`, then the build condition is ON by
default and there's no need to enable it explicitly with `--with=snapshot_build`.

Things related to release update
================================

* Add llvm-project tarball and signature to sources
* Fix: error: source 1001 defined multiple times
* Fix: error: source 1006 defined multiple times
* Fix missing newline
* Conditionally apply 0001-Always-build-shared-libs-for-LLD.patch
* Only enable offload runtime in snapshot mode

Misc.
=====

* Add missing prep dependency
2024-09-02 15:45:30 +02:00
Konrad Kleine
361c194ff0 lldb: Fail to configure if certain requirements are not met for testing 2024-09-02 15:45:30 +02:00
Konrad Kleine
be3aa829cb lldb: disable tests for lldb 2024-09-02 15:45:30 +02:00
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