From 2857455b03091ad444504a7315ed63fbf78eb4a0 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer Date: Sat, 28 Nov 2020 19:32:43 -0500 Subject: [PATCH] rustc: allow building for musl targets --- pkgs/development/compilers/rust/rustc.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index 65d8920c4a4c..dc2e57d4284a 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -1,4 +1,5 @@ { stdenv, removeReferencesTo, pkgsBuildBuild, pkgsBuildHost, pkgsBuildTarget +, targetPackages , fetchurl, file, python3 , llvm_10, darwin, cmake, rust, rustPlatform , pkgconfig, openssl @@ -92,6 +93,8 @@ in stdenv.mkDerivation rec { "${setTarget}.llvm-config=${llvmSharedForTarget}/bin/llvm-config" ] ++ optionals (stdenv.isLinux && !stdenv.targetPlatform.isRedox) [ "--enable-profiler" # build libprofiler_builtins + ] ++ optionals stdenv.targetPlatform.isMusl [ + "${setTarget}.musl-root=${targetPackages.stdenv.cc.libc}" ]; # The bootstrap.py will generated a Makefile that then executes the build.