1
0
Fork 0

Compare commits

...

4 commits

Author SHA1 Message Date
2356375ced Add clang compile_commands.json 2024-03-14 11:22:43 +01:00
99102c2c09 Add clangd script to devshell 2024-03-14 11:22:11 +01:00
06332ac698 Ignore clang cache 2024-03-14 11:12:46 +01:00
da2e47ff86 Add clang-tools to nix devshell 2024-03-14 10:17:35 +01:00
3 changed files with 37 additions and 0 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
# Nix/NixOS things
result
result-*
# Clangd cache
.cache/clangd

27
compile_commands.json Normal file
View file

@ -0,0 +1,27 @@
[
{
"arguments": [
"/nix/store/8nfqxz8d7ramdmc1h7yvnm45cghkknls-devkitARM/devkitARM/bin/arm-none-eabi-gcc",
"-g",
"-Wall",
"-O2",
"-mword-relocations",
"-ffunction-sections",
"-march=armv6k",
"-mtune=mpcore",
"-mfloat-abi=hard",
"-mtp=soft",
"-I/home/toast/Documents/Repos/3ds-helloWorld/include",
"-I/nix/store/8nfqxz8d7ramdmc1h7yvnm45cghkknls-devkitARM/libctru/include",
"-I/home/toast/Documents/Repos/3ds-helloWorld/build",
"-D__3DS__",
"-c",
"-o",
"main.o",
"/home/toast/Documents/Repos/3ds-helloWorld/source/main.c"
],
"directory": "/home/toast/Documents/Repos/3ds-helloWorld/build",
"file": "/home/toast/Documents/Repos/3ds-helloWorld/source/main.c",
"output": "/home/toast/Documents/Repos/3ds-helloWorld/build/main.o"
}
]

View file

@ -16,6 +16,13 @@
name = "3ds-devshell";
packages = with nixpkgs.legacyPackages.${system}; [
gnumake
clang-tools
(
writeShellScriptBin "generateClangCompileCommands" ''
make clean
${bear}/bin/bear -- make
''
)
];
shellHook = ''
export DEVKITPRO=${devkitARM}