From 0d16228ae22fa2e1a00e62dc099eea08da7717fe Mon Sep 17 00:00:00 2001 From: jarcherNV Date: Fri, 6 Jun 2025 14:30:06 -0700 Subject: Add command line option for separate debug info (#7178) * Add command line option for separate debug info Add command line arg -separate-debug-info which, if provided, produces both a .spv and a .dbg.spv file. The .dbg.spv file contains full debug info and the .spv file has all debug info stripped out. Also add a DebugBuildIdentifier instruction to store a unique hash in both the output files, so they can be more easily matched together. A matching API is provided to allow using the Slang API to retrieve a base and debug SPIRV as well as the debug build identifier string. --- source/compiler-core/slang-artifact-impl.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/compiler-core/slang-artifact-impl.h') diff --git a/source/compiler-core/slang-artifact-impl.h b/source/compiler-core/slang-artifact-impl.h index a307a9d6d..8df105953 100644 --- a/source/compiler-core/slang-artifact-impl.h +++ b/source/compiler-core/slang-artifact-impl.h @@ -94,6 +94,12 @@ public: return ComPtr(new Artifact(desc, name)); } + virtual SLANG_NO_THROW uint32_t SLANG_MCALL getItemCount() SLANG_OVERRIDE; + virtual SLANG_NO_THROW SlangResult SLANG_MCALL + getItemData(uint32_t index, slang::IBlob** outblob) SLANG_OVERRIDE; + virtual SLANG_NO_THROW SlangResult SLANG_MCALL getMetadata(slang::IMetadata** outMetadata) + SLANG_OVERRIDE; + protected: /// Ctor Artifact(const Desc& desc, const UnownedStringSlice& name) -- cgit v1.2.3