slangc
should allow specifying output file(s)
#11
Labels
kind:enhancement
a desirable new feature, option, or behavior
slangc
should allow specifying output file(s)
#11
Right now
slangc
always just writes its output to the console, which is convenient for testing (and mirrors whatfxc
does by default) but it doesn't have any provision right now for specifying an output file.In simple cases, we should be able to do something like:
and get the result we expect (DXBC for the
vsMain()
entry point function output to the filefoo.dxbc
).Ideally, the front-end driver should be able to infer the desired output format based on the file extension provided, so that you could change that command line to use
-o foo.spv
or-o foo.dxil
and it would Do What I Mean).(Cross-compilation from HLSL/Slang to GLSL should probably be triggered in a similar fashion, e.g.:
That seems like a slightly more complex feature than what this issue is trying to get at.)
As a simple starting point, this should only be allowed for compilations that involve a single entry point, and output to one of the existing formats that is designed for single entry points: DXBC, DXIL, or SPIR-V.
Longer term, we should define a container format that can hold output for multiple entry points (in any format), but that is a larger change.
The text was updated successfully, but these errors were encountered: