-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
openmp: fix cross compile #197674
openmp: fix cross compile #197674
Conversation
@@ -15,7 +16,9 @@ stdenv.mkDerivation rec { | |||
src = fetch pname "0i4bn84lkpm5w3qkpvwm5z6jdj8fynp7d3bcasa1xyq4is6757yi"; | |||
|
|||
nativeBuildInputs = [ cmake perl ]; | |||
buildInputs = [ llvm ]; | |||
buildInputs = [ | |||
(if stdenv.buildPlatform == stdenv.hostPlatform then llvm else targetLlvm) |
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.
(Commenting only on this one particular instance, but obviously applies to all.)
When buildPlatform == hostPlatform is there a meaningful difference between llvm and targetLlvm? In other words, could we always use targetLlvm here?
If this is done only to avoid rebuilds, I'd personally prefer rebuilds to long term code complexity / "technical debt".
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.
Here's why: if I simply use targetLlvm, then pkgsCross.aarch64-multiplatform.buildPackages.llvmPackages_14.openmp
will result in a failed build. The "build" version of the llvm libraries is included instead of the expected "host" version. I admit I'm not sure why this is the case. There may be a better way to model this.
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.
eh good enough i think. something should be done about the code duplication going on with llvmPackages
@ofborg build pkgsCross.aarch64-multiplatform.llvmPackages_14.openmp |
See NixOS#194634 for details. PRs: - NixOS#191372 - NixOS#190936 - NixOS#82131 - NixOS#199844 - NixOS#197674 - NixOS#184408 - NixOS#193004
See NixOS#194634 for details. PRs: - NixOS#191372 - NixOS#190936 - NixOS#82131 - NixOS#199844 - NixOS#197674 - NixOS#184408 - NixOS#193004
See NixOS#194634 for details. PRs: - NixOS#191372 - NixOS#190936 - NixOS#82131 - NixOS#199844 - NixOS#197674 - NixOS#184408 - NixOS#193004
See NixOS#194634 for details. PRs: - NixOS#191372 - NixOS#190936 - NixOS#82131 - NixOS#199844 - NixOS#197674 - NixOS#184408 - NixOS#193004
See NixOS#194634 for details. PRs: - NixOS#191372 - NixOS#190936 - NixOS#82131 - NixOS#199844 - NixOS#197674 - NixOS#184408 - NixOS#193004
this was backported to `llvmPackages_15` in 81ef82a
this was backported to `llvmPackages_15` in 81ef82a
this was backported to `llvmPackages_15` in 81ef82a
this was backported to `llvmPackages_15` in 81ef82a
llvmPackages_git.openmp: apply #197674 (fix cross compile)
Description of changes
Fixes cross compile for openmp.
Doesn't cause any rebuilds.
Tested cross builds from x86_64-linux -> aarch64-linux on llvmPackages 10 through 14. Tested all evaluations. Tested compilation of a few dependent packages.
The following attrs are now expected to build:
The following attrs are expected to produce the same output as the normal native build:
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/
)nixos/doc/manual/md-to-db.sh
to update generated release notes