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

llvmPackages: unify version for all platforms but Darwin #343245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

emilazy
Copy link
Member

@emilazy emilazy commented Sep 20, 2024

Description of changes

Currently, every platform uses LLVM 18 except for the following exceptions:

  • Darwin, on LLVM 16.
  • WASM, on LLVM 16.
  • Android, on LLVM 12.

As discussed with @RossComputerGuy and @alyssais on Matrix, we plan to bump both Darwin and Linux to LLVM 19 after the 24.11 branch‐off, and try to keep them in sync after that, bumping to new stable LLVM releases immediately after releases branch off.

This prepares for a 25.05 where llvmPackages is a simple platform‐independent alias by removing all the redundant branches and upgrading WASM and Android to LLVM 18.

I checked with @lilyinstarlight who did the previous LLVM bump for WASM and she confirmed that there should be no particular reason to keep it pinned to 16 so long as Firefox continues to compile, and I have confirmed that it does.

Android was last bumped back when the other platforms were on LLVM 7, which is pretty good evidence that these platform‐specific conditionals create unnecessary divergence and bitrot quickly. Due to the “maximum‐of‐minimums” cross‐compilation logic, it was inevitably picking LLVM 16 or 18 anyway. pkgsCross.aarch64-android.hello fails the exact same way as it does on master on all the platforms I tested (compiler-rt failing to build on aarch64-linux and x86_64-linux, and the Linux headers package expecting gcc(1) on aarch64-darwin).

I’m not entirely sure that the maximum‐of‐minimums logic is correct (should it be completely ignoring buildPlatform like this?), but since it will hopefully go away very soon I’ve decided not to spend more time thinking about it.

cc @rhelmot – do you expect bumping to LLVM 19 along with other platforms to be okay for FreeBSD?

Result of nixpkgs-review run on aarch64-linux 1

43 packages built:
  • adoptopenjdk-icedtea-web
  • betterbird
  • betterbird-unwrapped
  • betterbird-unwrapped.debug
  • eyewitness
  • firefox
  • firefox-beta
  • firefox-beta-unwrapped
  • firefox-beta-unwrapped.debug
  • firefox-beta-unwrapped.symbols
  • firefox-devedition
  • firefox-devedition-unwrapped
  • firefox-devedition-unwrapped.debug
  • firefox-devedition-unwrapped.symbols
  • firefox-esr
  • firefox-esr-115
  • firefox-esr-115-unwrapped
  • firefox-esr-115-unwrapped.debug
  • firefox-esr-115-unwrapped.symbols
  • firefox-esr-128-unwrapped
  • firefox-esr-128-unwrapped.debug
  • firefox-esr-128-unwrapped.symbols
  • firefox-mobile
  • firefox-unwrapped
  • firefox-unwrapped.debug
  • firefox-unwrapped.symbols
  • firefoxpwa
  • floorp
  • floorp-unwrapped
  • floorp-unwrapped.debug
  • librewolf
  • librewolf-unwrapped
  • librewolf-unwrapped.debug
  • sitespeed-io
  • slimerjs
  • thunderbird (thunderbird-128)
  • thunderbird-115
  • thunderbird-unwrapped
  • thunderbird-unwrapped.debug
  • thunderbird-unwrapped.symbols
  • thunderbirdPackages.thunderbird-115
  • thunderbirdPackages.thunderbird-115.debug
  • thunderbirdPackages.thunderbird-115.symbols

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

Currently, every platform uses LLVM 18 except for the following
exceptions:

* Darwin, on LLVM 16.
* WASM, on LLVM 16.
* Android, on LLVM 12.

As discussed with RossComputerGuy and alyssais on Matrix, we plan to
bump both Darwin and Linux to LLVM 19 after the 24.11 branch‐off,
and try to keep them in sync after that, bumping to new stable LLVM
releases immediately after releases branch off.

This prepares for a 25.05 where `llvmPackages` is a simple
platform‐independent alias by removing all the redundant branches
and upgrading WASM and Android to LLVM 18.

I checked with lilyinstarlight who did the previous LLVM bump for
WASM and she confirmed that there should be no particular reason to
keep it pinned to 16 so long as Firefox continues to compile, and I
have confirmed that it does.

Android was last bumped back when the other platforms
were on LLVM 7, which is pretty good evidence that these
platform‐specific conditionals create unnecessary divergence
and bitrot quickly. Due to the “maximum‐of‐minimums”
cross‐compilation logic, it was inevitably picking LLVM 16 or 18
anyway. `pkgsCross.aarch64-android.hello` fails the exact same way
as it does on `master` on all the platforms I tested (compiler-rt
failing to build on `aarch64-linux` and `x86_64-linux`, and the Linux
headers package expecting `gcc(1)` on `aarch64-darwin`).

I’m not entirely sure that the maximum‐of‐minimums logic is
correct (should it be completely ignoring `buildPlatform` like this?),
but since it will hopefully go away very soon I’ve decided not to
spend more time thinking about it.
@emilazy emilazy added the 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related label Sep 20, 2024
Copy link
Member

@RossComputerGuy RossComputerGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i approb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: darwin Running or building packages on Darwin 6.topic: llvm/clang Issues related to llvmPackages, clangStdenv and related 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants