Skip to content

Commit 6d04597

Browse files
committed
add clang and build with it
Signed-off-by: june-fish <git@june.fish>
1 parent dfa4bb5 commit 6d04597

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

flake.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
pkgs.perl
4646
pkgs.pkgsCross.riscv64-embedded.stdenv.cc.bintools.bintools
4747
pkgs.pkgsCross.riscv64-embedded.stdenv.cc.cc
48+
pkgs.pkgsCross.riscv64-embedded.llvmPackages.stdenv.cc.bintools.bintools
49+
pkgs.pkgsCross.riscv64-embedded.llvmPackages.stdenv.cc.cc
4850
pkgs.python3
4951
];
5052

@@ -101,7 +103,8 @@
101103
pkgs.tio
102104
];
103105
shellHook = ''
104-
export CC=riscv64-none-elf-gcc
106+
export CC=clang
107+
export CFLAGS="-target riscv64-none-elf -std=c23"
105108
export OBJDUMP=riscv64-none-elf-objdump
106109
export STRIP=riscv64-none-elf-strip
107110
'';

0 commit comments

Comments
 (0)