Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llvm: Cleanups and improvements #535

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

llvm: Cleanups and improvements #535

wants to merge 2 commits into from

Conversation

ReillyBrogan
Copy link
Contributor

@ReillyBrogan ReillyBrogan commented Jan 10, 2025

Changes:

  • Shrink the 32bit build significantly by limiting the target support to X86 and AMDGPU, and also only building LLVM. Also disable several additional features not needed for the 32bit build
  • And ARM and WebAssembly target support to the 64bit build for users cross-compiling
  • Get ccache working properly, and add debugging information so that it's possible to see how effective it is.
  • Disable building with PGO (this is temporary and will be re-enabled post LLVM 19)
  • Add openmp support (libomp)
  • Add clang-tools-extra (clang-tidy plus many other tools) so that we can build a more generally useful LLVM distribution for users.
  • Create clang-tools subpackage and move all of the build artifacts of clang-tools-extra there as well as clang-analyzer and other tools that were in clang that were not strictly necessary for compilation
  • Ensure that subpackage rundeps effectively pull in the packages they need. For instance clang-devel now depends on llvm-devel
  • Update various package descriptions
  • Build lld, clang, and llvm-ar so that they use the mimalloc memory allocator (improves performance by ~7%)
  • Patch LLD so that it always behaves as though --build-id=sha1 was passed (this matches binutils/mold)
  • Patch LLD so that it always behaves as though --compress-debug-symbols=zstd was passed (this matches binutils/mold)

Depends on serpent-os/tools#402
Depends on #447

Depends on serpent-os/tools#381 (not technically required but I only tested this with that PR applied)

Previously using `static-libgcc` with Clang would fail with an error that `libunwind.a` couldn't be found. This is because we have a static libgcc build, but not a corresponding static libunwind. Ensure that we build said static libunwind.

Signed-off-by: Reilly Brogan <[email protected]>
@ReillyBrogan ReillyBrogan requested a review from a team as a code owner January 10, 2025 23:12
@ReillyBrogan ReillyBrogan marked this pull request as draft January 14, 2025 00:43
Changes:
- Shrink the 32bit build significantly by limiting the target support to X86 and AMDGPU, and also only building LLVM. Also disable several additional features not needed for the 32bit build
- And ARM and WebAssembly target support to the 64bit build for users cross-compiling
- Get ccache working properly, and add debugging information so that it's possible to see how effective it is.
- Disable building with PGO (this is temporary and will be re-enabled post LLVM 19)
- Add openmp support (libomp)
- Add clang-tools-extra (clang-tidy plus many other tools) so that we can build a more generally useful LLVM distribution for users.
- Create `clang-tools` subpackage and move all of the build artifacts of `clang-tools-extra` there as well as clang-analyzer and other tools that were in `clang` that were not strictly necessary for compilation
- Ensure that subpackage rundeps effectively pull in the packages they need. For instance `clang-devel` now depends on `llvm-devel`
- Update various package descriptions
- Build lld, clang, and llvm-ar so that they use the mimalloc memory allocator (improves performance by ~7%)
- Patch LLD so that it always behaves as though `--build-id=sha1` was passed (this matches binutils/mold)
- Patch LLD so that it always behaves as though `--compress-debug-symbols=zstd` was passed (this matches binutils/mold)

Signed-off-by: Reilly Brogan <[email protected]>
@ReillyBrogan ReillyBrogan marked this pull request as ready for review January 14, 2025 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant