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 --- source/slang/slang.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 81171fdcc..f08a6fc44 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -3252,10 +3252,10 @@ SlangResult EndToEndCompileRequest::executeActionsInner() for (auto translationUnit : frontEndReq->translationUnits) { - translationUnit->getModule()->precompileForTargets( - getSink(), - this, - targetReq); + SlangCompileTarget target = SlangCompileTarget(targetReq->getTarget()); + translationUnit->getModule()->precompileForTarget( + target, + nullptr); } } } -- cgit v1.2.3