Skip to content

Conversation

@btipling
Copy link

@btipling btipling commented Aug 9, 2025

Looks like it was treating "dump.txt" as an input file. Removing the duplicate check for --dump-ir fixed it for me, but not sure if this is the correct fix.

C:\Users\Bjorn\projects\code\shady>vcc --rtlib=compiler-rt -I"%SHADY_INCLUDE_DIR%"  -o output.spv test\vcc\textured.frag.c --dump-ir dump.txt
clang version 20.1.8
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
file=test\vcc\textured.frag.c tmpfile=YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1
built command: clang -c -emit-llvm -S -g -O0 -ffreestanding -Wno-main-return-type -isystem"C:\Users\Bjorn\projects\code\shady\build\bin\Debug/../share/vcc/include/" -D__SHADY__=1 --target=spirv64-unknown-unknown -o YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1 "test\vcc\textured.frag.c" "--rtlib=compiler-rt" "-IC:\Users\Bjorn\projects\code\shady\build\share\vcc\include"
clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '--rtlib=compiler-rt' [-Wunused-command-line-argument]
Clang returned 0 and replied:
LLVM IR parsed successfully
built command: clang -c -emit-llvm -S -g -O0 -ffreestanding -Wno-main-return-type -isystem"C:\Users\Bjorn\projects\code\shady\build\bin\Debug/../share/vcc/include/" -D__SHADY__=1 --target=spirv64-unknown-unknown -o YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1 "dump.txt" "--rtlib=compiler-rt" "-IC:\Users\Bjorn\projects\code\shady\build\share\vcc\include"
clang: error: no such file or directory: 'dump.txt'
clang: error: no input files
Clang returned 1 and replied:

Looks like it was treating "dump.txt" as an input file. Removing the
duplicate check for --dump-ir fixed it for me, but not sure if this is
the correct fix.

```
C:\Users\Bjorn\projects\code\shady>vcc --rtlib=compiler-rt -I"%SHADY_INCLUDE_DIR%"  -o output.spv test\vcc\textured.frag.c --dump-ir dump.txt
clang version 20.1.8
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin
file=test\vcc\textured.frag.c tmpfile=YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1
built command: clang -c -emit-llvm -S -g -O0 -ffreestanding -Wno-main-return-type -isystem"C:\Users\Bjorn\projects\code\shady\build\bin\Debug/../share/vcc/include/" -D__SHADY__=1 --target=spirv64-unknown-unknown -o YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1 "test\vcc\textured.frag.c" "--rtlib=compiler-rt" "-IC:\Users\Bjorn\projects\code\shady\build\share\vcc\include"
clang: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument]
clang: warning: argument unused during compilation: '--rtlib=compiler-rt' [-Wunused-command-line-argument]
Clang returned 0 and replied:
LLVM IR parsed successfully
built command: clang -c -emit-llvm -S -g -O0 -ffreestanding -Wno-main-return-type -isystem"C:\Users\Bjorn\projects\code\shady\build\bin\Debug/../share/vcc/include/" -D__SHADY__=1 --target=spirv64-unknown-unknown -o YxF1N1OSdKkyybRybFw5cMAsPYpm2Vw1 "dump.txt" "--rtlib=compiler-rt" "-IC:\Users\Bjorn\projects\code\shady\build\share\vcc\include"
clang: error: no such file or directory: 'dump.txt'
clang: error: no input files
Clang returned 1 and replied:
```
Hugobros3 added a commit that referenced this pull request Sep 5, 2025
@Hugobros3
Copy link
Collaborator

Thanks for the PR!

I actually like the ability to dump to std output, so I just renamed the other option.

@Hugobros3 Hugobros3 closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants