-
-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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: add libedit #300157
base: staging
Are you sure you want to change the base?
llvm: add libedit #300157
Conversation
This causes about 250KiB of closure size, which is not really appreciably making anything worse given how big LLVM is. It fixes NixOS#85217 in which clang-query and probably some other tools had broken line editing. I have in fact built and tested all of these versions, with many thanks to Raito's build machine :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be tested with a darwin stdenv build as well as a darwin freshBootstrapTools.test build
there is only one consumer of LLVM9 so seems fine to ignore it. However, LLVM18 and git exists. |
fails building darwin stdenv:
|
This PR needs attention now that everything is commonified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please can you add libedit to the args of the root llvm default.nix as well:
nixpkgs/pkgs/development/compilers/llvm/git/default.nix
Lines 1 to 3 in ba06293
{ lowPrio, newScope, pkgs, lib, stdenv, cmake, ninja | |
, preLibcCrossHeaders | |
, libxml2, python3, fetchFromGitHub, substituteAll, overrideCC, wrapCCWith, wrapBintoolsWith |
This will allow creating a consistent set of llvmPackages where libedit is overridden by doing llvmPackages.override
, which is otherwise hard to achieve by doing llvmPackages.llvm.override
since it is difficult to thread the overridden llvm through.
Edit, see also: https://github.com/NixOS/nixpkgs/pull/320261/files
The PR took an approach which means it's not necessary any more, carry on. (Though the comment below is still relevant)
@@ -313,6 +314,7 @@ stdenv.mkDerivation (rec { | |||
"-DLLVM_HOST_TRIPLE=${stdenv.hostPlatform.config}" | |||
"-DLLVM_DEFAULT_TARGET_TRIPLE=${stdenv.hostPlatform.config}" | |||
"-DLLVM_ENABLE_DUMP=ON" | |||
"-DLLVM_ENABLE_LIBEDIT=FORCE_ON" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is FORCE_ON necessary? If it is, can you conditionalize it on libedit != null
so that it can be switched off with .override { libedit = null; }
.
This causes about 250KiB of closure size, which is not really appreciably making anything worse given how big LLVM is.
It fixes #85217 in which clang-query and probably some other tools had broken line editing.
I have in fact built and tested all of these versions, with many thanks to Raito's build machine :)
Unsure if this is also good for versions of llvm less than 12; I stopped at 12 since that's where it starts getting quite frankly really old.
Description of changes
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.