From 27b2229baa635f4cd6316d987a05ae8979ceab68 Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Thu, 15 Aug 2024 12:36:41 -0400 Subject: Make precompileForTargets work with Slang API (#4845) * Make precompileForTargets work with Slang API precompileForTargets, renamed to precompileForTarget, does not need an EndToEndCompileRequest and some objects created from it are not necessary either. Take only a target enum and a diagnostic blob as input and handle everything else internally, such as creating the TargetReq with chosen profile. Fixes #4790 * Update slang-module.cpp * Update slang-module.cpp --- include/slang.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/slang.h b/include/slang.h index 05ab1a0ce..3df31f0f0 100644 --- a/include/slang.h +++ b/include/slang.h @@ -5444,6 +5444,10 @@ namespace slang SlangInt32 index) = 0; virtual SLANG_NO_THROW DeclReflection* SLANG_MCALL getModuleReflection() = 0; + + virtual SLANG_NO_THROW SlangResult SLANG_MCALL precompileForTarget( + SlangCompileTarget target, + ISlangBlob** outDiagnostics) = 0; }; #define SLANG_UUID_IModule IModule::getTypeGuid() -- cgit v1.2.3