summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorJulius Ikkala <julius.ikkala@gmail.com>2025-01-18 09:08:45 +0200
committerGitHub <noreply@github.com>2025-01-17 23:08:45 -0800
commitd09b6bccd5f06c1dd66dc28603a3defdd8615a12 (patch)
treeb5eb31f1147006164981333dcbd0f26798c39cb8 /source/slang/slang-compiler.cpp
parenta85c350df03c6cdf9b433f58fc0e66affda03e9e (diff)
Make -depfile work for binary modules output too (#6126)
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp7
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;
}