Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{ lib
, fetchFromGitHub
, hostPlatform
, cargo
, rustc
, lld
}:

Expand All @@ -24,12 +22,7 @@ let
};
};

# inherit (cross) rustPlatform;
# ^ breaks because we are doing a no_std embedded build with a custom sysroot,
# but the fast_cross rustc wrapper already passes a sysroot argument
rustPlatform = cross.makeRustPlatform {
inherit rustc cargo;
};
inherit (cross) rustPlatform;

in

Expand Down
15 changes: 14 additions & 1 deletion pkgs/build-support/rust/rustc-wrapper/rustc-wrapper.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
#!@shell@

extraBefore=(@sysroot@)
defaultSysroot=(@sysroot@)

for arg; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Every day I learn some crazy new bash syntax. :^)

case "$arg" in
--sysroot)
defaultSysroot=()
;;
--)
break
;;
esac
done

extraBefore=("${defaultSysroot[@]}")
extraAfter=($NIX_RUSTFLAGS)

# Optionally print debug info.
Expand Down