diff options
| author | Julius Ikkala <julius.ikkala@gmail.com> | 2025-01-18 09:08:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-17 23:08:45 -0800 |
| commit | d09b6bccd5f06c1dd66dc28603a3defdd8615a12 (patch) | |
| tree | b5eb31f1147006164981333dcbd0f26798c39cb8 /source | |
| parent | a85c350df03c6cdf9b433f58fc0e66affda03e9e (diff) | |
Make -depfile work for binary modules output too (#6126)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-compiler.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index c0c2c09c5..5ace72708 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -2421,6 +2421,13 @@ static SlangResult _writeDependencyFile(EndToEndCompileRequest* compileRequest) } } + // When the output is a binary module, linkage->targets can be empty. So + // we need to do their dependencies separately. + if (compileRequest->m_containerFormat == ContainerFormat::SlangModule) + { + _writeDependencyStatement(stream, compileRequest, compileRequest->m_containerOutputPath); + } + return SLANG_OK; } |
