From 3fea56ef77a33273bf5af6f432163b30c0a0e1dc Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 10 Mar 2023 14:19:48 -0500 Subject: 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. --- source/compiler-core/slang-artifact-desc-util.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/compiler-core/slang-artifact-desc-util.cpp') 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(); -- cgit v1.2.3