From 0289aa115c32a2b4b6c4b17daa791de10ab20161 Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Sat, 15 Feb 2025 00:09:02 +0100 Subject: [PATCH] rustc: enable bpfe library targets --- pkgs/development/compilers/rust/rustc.nix | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkgs/development/compilers/rust/rustc.nix b/pkgs/development/compilers/rust/rustc.nix index e3aa4e772511..6e8dfcc023c9 100644 --- a/pkgs/development/compilers/rust/rustc.nix +++ b/pkgs/development/compilers/rust/rustc.nix @@ -157,23 +157,22 @@ stdenv.mkDerivation (finalAttrs: { concatStringsSep "," ( [ stdenv.targetPlatform.rust.rustcTargetSpec - - # Other targets that don't need any extra dependencies to build. ] + # Other targets that don't need any extra dependencies to build. ++ optionals (!fastCross) [ "wasm32-unknown-unknown" - - # (build!=target): When cross-building a compiler we need to add - # the build platform as well so rustc can compile build.rs - # scripts. + "bpfel-unknown-none" + "bpfeb-unknown-none" ] + # (build!=target): When cross-building a compiler we need to add + # the build platform as well so rustc can compile build.rs + # scripts. ++ optionals (stdenv.buildPlatform != stdenv.targetPlatform && !fastCross) [ stdenv.buildPlatform.rust.rustcTargetSpec - - # (host!=target): When building a cross-targeting compiler we - # need to add the host platform as well so rustc can compile - # build.rs scripts. ] + # (host!=target): When building a cross-targeting compiler we + # need to add the host platform as well so rustc can compile + # build.rs scripts. ++ optionals (stdenv.hostPlatform != stdenv.targetPlatform && !fastCross) [ stdenv.hostPlatform.rust.rustcTargetSpec ]