"nim c -r test.nim":
clang.exe -c -w -ferror-limit=3 -O3 -IC:\Users\User\.choosenim\toolchains\nim-1.6.0\lib -ID:\Amjad\AoC2021 -o C:\Users\User\nimcache\test_r\@mtest.nim.c.o C:\Users\User\nimcache\test_r\@mtest.nim.c
nim c -r -d:danger test.nim:
clang.exe -c -w -ferror-limit=3 -IC:\Users\User\.choosenim\toolchains\nim-1.6.0\lib -ID:\Amjad\AoC2021 -o C:\Users\User\nimcache\test_d\@mtest.nim.c.o C:\Users\User\nimcache\test_d\@mtest.nim.c
the difference is the -O3 in release build. clang, on Windows in the debug build creates test.ilk (3272 kB) and test.pdb (6236 KB), vcc (msvc) and gcc don't.
How do I disable this ?
I would simply delete these files after a build.
What, that's even more annoying.
this seems like a bug in either clang or nim. Ideally if you don't pass "debugger:native" to nim then nim would instruct clang not to emit debug info.
It may be that clang's debug info generation rules are "odd" when using clang.exe (not clang-cl, i.e. clang with the gnu command line) in msvc-abi mode.
It was introduced in https://github.com/nim-lang/Nim/pull/9976
Ideally if you don't pass "debugger:native" to nim then nim would instruct clang not to emit debug info.
I agree.