Cached files. What is where and why

I am trying to output some asm with -femit-asm.

Browsing through the main.s to my astonishment I saw things like:

.Ltmp81:
	.cv_file	14 "C:\\Users\\Eric\\AppData\\Roaming\\Code\\User\\globalStorage\\ziglang.vscode-zig\\zig\\x86_64-windows-0.15.2\\lib\\std\\fmt.zig"

First: this is of course utterly unfindable. Many hidden secret megabytes :slight_smile:
Second: why on earth are files stored here while fmt.zig is just in my zig folder?
Third: which entity is responsible storing these files? zig? vscode? zls?

It is zig installed by the vscode-zig extension.

2 Likes

I seem to remember that on first install the VSCode Zig extensions has some popups whether it should install its own Zig toolchain and this is probably what happened.

You can override the zig path via the Zig: Path setting. E.g. I’m using zvm to manage zig version and have this in my VSCode settings for Zig: Path: /Users/floh/.zvm/bin/zig

…and the same for zls: VSCode setting is Zig β€Ί Zls: Path, and for my setup the path override is /Users/floh/.zvm/bin/zls.