summaryrefslogtreecommitdiff
path: root/source/compiler-core/slang-artifact-desc-util.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2023-03-10 14:19:48 -0500
committerGitHub <noreply@github.com>2023-03-10 14:19:48 -0500
commit3fea56ef77a33273bf5af6f432163b30c0a0e1dc (patch)
tree446df8ddd73521b33e836facaea2c27ef84c47fe /source/compiler-core/slang-artifact-desc-util.cpp
parente39893e8eb1a9411fca4e5f885456a27a770d3a2 (diff)
Support for PDB output from DXC (#2693)
* #include an absolute path didn't work - because paths were taken to always be relative. * Add versioning to CompileOptions for DownstreamCompiler so we can add new options without breaking binary interface. * Add support for debug info format to API/command line processing. * Small simplification. * Add support for adding PDB output from a compilation. * Use builtin offset of directly. * Fix typo in debug.
Diffstat (limited to 'source/compiler-core/slang-artifact-desc-util.cpp')
-rw-r--r--source/compiler-core/slang-artifact-desc-util.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/compiler-core/slang-artifact-desc-util.cpp b/source/compiler-core/slang-artifact-desc-util.cpp
index 7e274794f..fff68738c 100644
--- a/source/compiler-core/slang-artifact-desc-util.cpp
+++ b/source/compiler-core/slang-artifact-desc-util.cpp
@@ -219,6 +219,7 @@ SLANG_HIERARCHICAL_ENUM(ArtifactKind, SLANG_ARTIFACT_KIND, SLANG_ARTIFACT_KIND_E
x(CompileResults, Base) \
x(Metadata, Base) \
x(DebugInfo, Metadata) \
+ x(PdbDebugInfo, DebugInfo) \
x(Diagnostics, Metadata) \
x(Miscellaneous, Base) \
x(Log, Miscellaneous) \
@@ -549,6 +550,12 @@ static const KindExtension g_cpuKindExts[] =
return ArtifactDesc::make(ArtifactKind::Assembly, ArtifactPayload::HostCPU);
}
+ if (slice == toSlice("pdb"))
+ {
+ // Program database
+ return ArtifactDesc::make(ArtifactKind::Assembly, ArtifactPayload::PdbDebugInfo);
+ }
+
for (const auto& kindExt : g_cpuKindExts)
{
if (slice == kindExt.ext)
@@ -613,6 +620,8 @@ static UnownedStringSlice _getPayloadExtension(ArtifactPayload payload)
case Payload::MetalAIR: return toSlice("air");
+ case Payload::PdbDebugInfo: return toSlice("pdb");
+
default: break;
}
return UnownedStringSlice();