julia.withPackages: add juliaCpuTarget option #361655
Merged
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.
Copying from the documentation I added for this feature:
juliaCpuTarget
: Allows you to setJULIA_CPU_TARGET
when precompiling. Has no effect ifprecompile=false
.You may want to use this if you're building a Julia depot that will end up in a Nix cache and used on machines with
different CPUs.
Why? Julia will detect the CPU microarchitecture of the build machine and include this information in the precompiled
*.ji
files. Starting in 1.10 Julia became more strict about checking the CPU target compatibility, so it may rejectyour precompiled files if they were compiled on a different machine.
A good option to provide wide compatibility is to set this to
"generic"
, although this may reduce performance.You can also set a semicolon-separated list of multiple different targets. See the Julia documentation for details.
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.