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

rustPlatform: fix darwin build failure #101136

Merged
merged 1 commit into from Oct 21, 2020
Merged

rustPlatform: fix darwin build failure #101136

merged 1 commit into from Oct 21, 2020

Conversation

zowoq
Copy link
Contributor

@zowoq zowoq commented Oct 20, 2020

Motivation for this change

Fix https://hydra.nixos.org/build/128509615/nixlog/2

Kind of reverts the clang changes in b837bd4.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@marsam
Copy link
Contributor

marsam commented Oct 20, 2020

I think we could apply it conditionally on all-packages.nix

diff --git i/pkgs/top-level/all-packages.nix w/pkgs/top-level/all-packages.nix
index c74f2249fc8..c5bfc9416f8 100644
--- i/pkgs/top-level/all-packages.nix
+++ w/pkgs/top-level/all-packages.nix
@@ -9661,11 +9661,11 @@ in
   # So this commit doesn't remove the 1.45.2 release.
   rust_1_45 = callPackage ../development/compilers/rust/1_45.nix {
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
-    llvmPackages = llvmPackages_10;
+    llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10;
   };
   rust_1_46 = callPackage ../development/compilers/rust/1_46.nix {
     inherit (darwin.apple_sdk.frameworks) CoreFoundation Security;
-    llvmPackages = llvmPackages_10;
+    llvmPackages = if stdenv.cc.isClang then llvmPackages_5 else llvmPackages_10;
   };
   rust = rust_1_46;

@ofborg ofborg bot removed the 6.topic: rust label Oct 20, 2020
@zowoq
Copy link
Contributor Author

zowoq commented Oct 21, 2020

Merging as it's blocking nixpkgs-unstable.

@zowoq zowoq merged commit c43e01b into NixOS:master Oct 21, 2020
@zowoq zowoq deleted the unbreak-darwin-rust branch October 21, 2020 10:20
@vcunat vcunat mentioned this pull request Oct 21, 2020
10 tasks
bobrik added a commit to bobrik/nixpkgs that referenced this pull request Mar 18, 2021
We downgraded when LLVM 10 wasn't working well on Darwin: NixOS#101136.
Now that we're using LLVM 11, the issue is no longer present.
thefloweringash pushed a commit to thefloweringash/nixpkgs that referenced this pull request Mar 18, 2021
We downgraded when LLVM 10 wasn't working well on Darwin: NixOS#101136.
Now that we're using LLVM 11, the issue is no longer present.

(cherry picked from commit df2cdfa)
zowoq pushed a commit that referenced this pull request Mar 19, 2021
We downgraded when LLVM 10 wasn't working well on Darwin: #101136.
Now that we're using LLVM 11, the issue is no longer present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants