From c3992220e56ee324fb867be9328984678a5759a9 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sun, 7 Apr 2019 23:16:00 +0800 Subject: [PATCH] rustc: fix crates compilation --- compilers/rust/default.nix | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/compilers/rust/default.nix b/compilers/rust/default.nix index db591af..7f1e4ac 100644 --- a/compilers/rust/default.nix +++ b/compilers/rust/default.nix @@ -11,25 +11,24 @@ let url = "https://static.rust-lang.org/dist/rustc-${version}-src.tar.gz"; sha256 = "0ji2l9xv53y27xy72qagggvq47gayr5lcv2jwvmfirx029vlqnac"; }; - # nixcloud team code riscv32imac-crates = stdenv.mkDerivation { name = "riscv32imac-crates"; inherit src; phases = [ "unpackPhase" "buildPhase" ]; buildPhase = '' destdir=$out - rustc="${rustc_internal}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target riscv32imac-unknown-none-elf -g -C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s --crate-type rlib" + rustc="${rustc_internal}/bin/rustc --out-dir ''${destdir} -L ''${destdir} --target riscv32imac-unknown-none-elf -g -C opt-level=s --crate-type rlib" mkdir -p ''${destdir} ''${rustc} --crate-name core src/libcore/lib.rs ''${rustc} --crate-name compiler_builtins src/libcompiler_builtins/src/lib.rs --cfg 'feature="compiler-builtins"' --cfg 'feature="mem"' - ''${rustc} --crate-name std_unicode src/libstd_unicode/lib.rs ''${rustc} --crate-name alloc src/liballoc/lib.rs - ''${rustc} --crate-name libc src/liblibc_mini/lib.rs - ''${rustc} --crate-name unwind src/libunwind/lib.rs - ''${rustc} -Cpanic=abort --crate-name panic_abort src/libpanic_abort/lib.rs - ''${rustc} -Cpanic=unwind --crate-name panic_unwind src/libpanic_unwind/lib.rs --cfg llvm_libunwind ''; + # ''${rustc} --crate-name libc ${./libc_mini.rs} + # ''${rustc} --crate-name unwind src/libunwind/lib.rs + # ''${rustc} --crate-name std src/libstd/lib.rs + # ''${rustc} -Cpanic=abort --crate-name panic_abort src/libpanic_abort/lib.rs + # ''${rustc} -Cpanic=unwind --crate-name panic_unwind src/libpanic_unwind/lib.rs --cfg llvm_libunwind }; # nixcloud team code # originally rustc but now renamed to rustc_internal