microsoft / microsoft/DirectXShaderCompiler
depfile generation isn't supported in the same invocation as compilation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
Clang and other compilers with a similar CLI like glslc support -MD -MF in the same invocation of the compiler that does the compilation, which e.g. enables this common pattern in CMake: https://stackoverflow.com/questions/71003674/using-glslcs-depfile-to-make-included-files-automatically-trigger-recompile-of
Steps to Reproduce
dxc -T lib_6_7 -O3 -MD -MF source.d -Fo source.cso source.hlsl
Actual Behavior
The above command line produces source.d but doesn't produce source.cso and doesn't print any errors or warnings either, which is confusing.
Definitely related to #4723
As a workaround for CMake, the add_custom_command can have two COMMAND options for two DXC invocations.
Environment
- DXC version: 1.7.2207
- Host Operating System: Win 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported command with DXC and trace the command-line handling for -MD and -MF when compilation is requested in the same invocation. Done means the command produces both source.d and source.cso, reports appropriate diagnostics, and has regression coverage for this invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100