-
-
Notifications
You must be signed in to change notification settings - Fork 14k
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
[22.11] Backport llvmPackages_16 #230327
Merged
Merged
[22.11] Backport llvmPackages_16 #230327
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 2c627d9) Reason: This backport is required for building Chromium on NixOS 22.11 (we need the most recent versions for important security fixes).
(cherry picked from commit d4c2564)
(cherry picked from commit 3c7fba2)
(cherry picked from commit fd155c2)
(cherry picked from commit c672de3) Reason: This is required for llvmPackages_16 (and llvmPackages_15). Only if stdenv.hostPlatform.isFreeBSD but backporting new packages is fine and so that everything evaluates without errors.
This code is backported from nixos-unstable (2c627d9) and the power platform isn't defined/supported on NixOS 22.11 yet, e.g.: ``` $ nix-instantiate -A llvmPackages_16 error: attribute 'power' missing at /home/michael/nixpkgs/worktrees/22.11/pkgs/development/compilers/llvm/16/default.nix:96:7: 95| lib.platforms.mips ++ 96| lib.platforms.power ++ | ^ 97| lib.platforms.riscv ++ (use '--show-trace' to show detailed location information) ```
This comes from eb2eafd (or rather [0]). I only backported the patch instead of the whole commit to avoid mass rebuilds for llvmPackages 13 and 14 (there is a small diff in the patches due to the headers ("index" and the line numbers)). This fixes: ``` error (ignored): error: end of string reached error: getting status of 'pkgs/development/compilers/llvm/common/clang/add-nostdlibinc-flag.patch': No such file or directory ``` [0]: pkgs/development/compilers/llvm/git/clang/add-nostdlibinc-flag.patch
This code is backported from nixos-unstable (2c627d9) and isn't fully compatible with NixOS 22.11 due to other missing abstractions/changes. I simply went with the exact same code as the other llvmPackages already use here. This fixes the following error: ``` error: cannot coerce a set to a string at pkgs/development/compilers/llvm/16/compiler-rt/default.nix:34:3: 33| 34| env.NIX_CFLAGS_COMPILE = toString [ | ^ 35| "-DSCUDO_DEFAULT_OPTIONS=DeleteSizeMismatch=0:DeallocationTypeMismatch=0" ```
@ofborg build llvmPackages_16 I only tested the evaluation so far: $ nix-instantiate -A llvmPackages_16
warning: you did not specify '--add-root'; the result might be removed by the garbage collector
/nix/store/86fpv6nb4zjpcvjp5xpy25qd6awqhsa5-llvm-binutils-wrapper-16.0.1.drv
/nix/store/28677s50j95vdwa2dmrlbm4rr0n8b0cx-llvm-binutils-16.0.1.drv
/nix/store/dpc8xzf4jgw55jrjz4ssp2smzzidq3wh-llvm-binutils-wrapper-16.0.1.drv
/nix/store/7vhmnsb7lcf986n173x8nya24h435xp8-clang-wrapper-16.0.1.drv
/nix/store/vgagxq7v2ldf37kc7z9kghxajvwkgpzv-clang-manpages-16.0.1.drv
/nix/store/s3ag3ha9miiz8if229azi22zfn9vknk3-clang-16.0.1.drv
/nix/store/pyap0hdcxnknwac3qw4dr37l2wn9mnhr-clang-wrapper-16.0.1.drv
/nix/store/hkaqai3n1r3bygr1jxs8flrxym4qyx57-clang-wrapper-16.0.1.drv
/nix/store/m0s7q6c45wzw427ya4ca2lwqlq5n9niz-clang-wrapper-16.0.1.drv
/nix/store/18a3yhq3y8k7pka2d1jwy6h74bf9dax4-clang-wrapper-16.0.1.drv
/nix/store/3dnhvlc5hir6y7cxs3jsni4nhi7prv75-clang-wrapper-16.0.1.drv
/nix/store/ljrqb9ni31pd348979b6g86srsfiqg0h-compiler-rt-libc-16.0.1.drv
/nix/store/ljrqb9ni31pd348979b6g86srsfiqg0h-compiler-rt-libc-16.0.1.drv
/nix/store/03dikf4i5c9q0kjfakym365kznvf9mha-libcxx-16.0.1.drv
/nix/store/5iiq413szhrvx6zsblrq2m81cdw8cas2-clang-wrapper-16.0.1.drv
/nix/store/ba4snx03y5vqs8fq1j3x5ynfpflw9dm1-stdenv-linux.drv
/nix/store/qjx68q7w3s534k81vf4bw7nrw5fbwvsd-libcxxabi-16.0.1.drv
/nix/store/m3dl5s6j3532r9faxnkqyx13zh5l8pgh-llvm-16.0.1.drv
/nix/store/3mpc941xxrg5z2bv67b21b697p95gg1z-libunwind-16.0.1.drv
/nix/store/5s8v4kjbxni7ijp9njwlbyqkm74rwfpp-lld-16.0.1.drv
/nix/store/0nigf0sca85x6sah7hrg1xx5f7z4i51c-lldb-16.0.1.drv
/nix/store/3fvsx6373npk6r7fzms9iacgf4bbrn25-lldb-manpages-16.0.1.drv
/nix/store/dm8cwh1ivr7dw126lcr2yc4fy4jqx2hi-llvm-manpages-16.0.1.drv
/nix/store/6a9mrlsxv9aqjg2zb3yd3q96zhfcqkl1-openmp-16.0.1.drv
/nix/store/p4phsczxvkddhbf9dyc4hcnhq6ny774g-stdenv-linux.drv |
ofborg
bot
requested review from
dtzWill,
sternenseemann,
lovek323,
alyssais and
Ericson2314
May 6, 2023 12:28
CI seems fine so let's give this a try :) |
1 task
rrbutani
added
the
6.topic: llvm/clang
Issues related to llvmPackages, clangStdenv and related
label
May 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
6.topic: llvm/clang
Issues related to llvmPackages, clangStdenv and related
8.has: package (new)
10.rebuild-darwin: 11-100
10.rebuild-linux: 11-100
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
This is a backport of #223282 with some additional (trivial) commits to make it compatible with NixOS 22.11.
It only adds new packages and shouldn't change any existing packages.
We require LLVM 16 for building Chromium (where we need the most recent version (M113) for important security fixes).
On nixos-unstable the builds look fine so far: https://hydra.nixos.org/eval/1794582?filter=llvmPackages_16&compare=1794561&full=
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)