I am trying to create a transpiler that 1) reads source code in a syntax invented by myself, 2) generates C code, and then 3) passes the generated C code via stdin to execution of a zig cc ... command.
Unfortunately, that zig cc generates not only an .exe file but also .pdb file (!?). I wonder if the .pdb file can be disabled in any way, for example with a magic CLI flag set in front of the zig cc command, with a magic environment variable, by instead using zig build-exe ... with flags to compile the C code via stdin, or some other way. In sum, I am trying to find a painless way of integrating zig cc as a backend C compiler for my transpiler.
Reproducing this can be done as follows:
> # Write a hello world program into a .c file. For example:
> cat .\hello_world.c
#include <stdio.h>
int main(void) {
printf("hello, world\n");
}
> # Then, compile it by piping it into a `zig cc` command:
> cat .\hello_world.c | zig cc -x c - -Wall -Wextra -o hello_world.exe
And then, I get the following new files in my current working directory: hello_world.exe; and hello_world.pdb.
What can I do differently so that the .pdb file does not appear?