summaryrefslogtreecommitdiff
path: root/slang.h
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 /slang.h
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 'slang.h')
-rw-r--r--slang.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/slang.h b/slang.h
index ac097fbde..d79d7829c 100644
--- a/slang.h
+++ b/slang.h
@@ -756,6 +756,21 @@ extern "C"
};
+ /* Describes the debugging information format produced during a compilation. */
+ typedef SlangUInt32 SlangDebugInfoFormatIntegral;
+ enum SlangDebugInfoFormat : SlangDebugInfoFormatIntegral
+ {
+ SLANG_DEBUG_INFO_FORMAT_DEFAULT, ///< Use the default debugging format for the target
+ SLANG_DEBUG_INFO_FORMAT_C7, ///< CodeView C7 format (typically means debugging infomation is embedded in the binary)
+ SLANG_DEBUG_INFO_FORMAT_PDB, ///< Program database
+
+ SLANG_DEBUG_INFO_FORMAT_STABS, ///< Stabs
+ SLANG_DEBUG_INFO_FORMAT_COFF, ///< COFF debug info
+ SLANG_DEBUG_INFO_FORMAT_DWARF, ///< DWARF debug info (we may want to support specifying the version)
+
+ SLANG_DEBUG_INFO_FORMAT_COUNT_OF,
+ };
+
typedef SlangUInt32 SlangOptimizationLevelIntegral;
enum SlangOptimizationLevel : SlangOptimizationLevelIntegral
{
@@ -1530,6 +1545,11 @@ extern "C"
SlangCompileRequest* request,
SlangDebugInfoLevel level);
+ /*! @see slang::ICompileRequest::setDebugInfoFormat */
+ SLANG_API void spSetDebugInfoFormat(
+ SlangCompileRequest* request,
+ SlangDebugInfoFormat format);
+
/*! @see slang::ICompileRequest::setOptimizationLevel */
SLANG_API void spSetOptimizationLevel(
SlangCompileRequest* request,
@@ -4044,6 +4064,9 @@ namespace slang
/** Sets the flags of the request's diagnostic sink.
The previously specified flags are discarded. */
virtual SLANG_NO_THROW void SLANG_MCALL setDiagnosticFlags(SlangDiagnosticFlags flags) = 0;
+
+ /** Set the debug format to be used for debugging information */
+ virtual SLANG_NO_THROW void SLANG_MCALL setDebugInfoFormat(SlangDebugInfoFormat debugFormat) = 0;
};
#define SLANG_UUID_ICompileRequest ICompileRequest::getTypeGuid()