Next-generation FPGA SoC toolkit
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
1015 B

{ stdenv, rustc }:
stdenv.mkDerivation {
name = "rust-riscv32i-crates";
src = rustc.src;
phases = [ "unpackPhase" "buildPhase" ];
buildPhase = ''
rustc="${rustc}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target riscv32i-unknown-none-elf -g -C opt-level=s --crate-type rlib"
mkdir -p ''${destdir}
''${rustc} --crate-name core src/libcore/
''${rustc} --crate-name alloc src/liballoc/
# ''${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/ --cfg 'feature="compiler-builtins"' --cfg 'feature="mem"'
# ''${rustc} --crate-name libc ${./}
# ''${rustc} --crate-name unwind src/libunwind/
# ''${rustc} --crate-name std src/libstd/
# ''${rustc} -Cpanic=abort --crate-name panic_abort src/libpanic_abort/
# ''${rustc} -Cpanic=unwind --crate-name panic_unwind src/libpanic_unwind/ --cfg llvm_libunwind