-vcg-ast produces a .cg (CodeGen) files which will always be in the same directory as the main D source file, e.g. main.d -> main.cg
For more information, see the regarding discussion on GitHub:
https://github.com/dlang/dmd/pull/6888
Comment #1 by alphaglosined — 2022-04-19T14:41:27Z
This has come up on Discord in relation to dub.
It was surprising to the user that the location was tied to the source file rather than the project directory.
It would be ideal if dub could change the location automatically if the flag is passed so that it would be less of a surprise.
Comment #2 by robert.schadek — 2024-12-13T18:52:37Z