From 255fd5873f65a6b01d5385c277d55612dc3cc587 Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 28 Mar 2022 22:14:33 -0700 Subject: Allow slangc to generate exe from .slang file. (#2170) --- source/slang/slang.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index e0b11604c..e83ab2da3 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -215,8 +215,8 @@ void Session::_initCodeGenTransitionMap() // We *don't* add a default for host callable, as we will determine what is suitable depending on what // is available. We prefer LLVM if that's available. If it's not we can use generic C/C++ compiler - map.addTransition(source, CodeGenTarget::SharedLibrary, PassThroughMode::GenericCCpp); - map.addTransition(source, CodeGenTarget::Executable, PassThroughMode::GenericCCpp); + map.addTransition(source, CodeGenTarget::ShaderSharedLibrary, PassThroughMode::GenericCCpp); + map.addTransition(source, CodeGenTarget::HostExecutable, PassThroughMode::GenericCCpp); map.addTransition(source, CodeGenTarget::ObjectCode, PassThroughMode::GenericCCpp); } } @@ -666,7 +666,7 @@ SlangPassThrough Session::getDownstreamCompilerForTransition(SlangCompileTarget } // Special case host-callable - if (target == CodeGenTarget::HostCallable) + if (target == CodeGenTarget::ShaderHostCallable) { if (source == CodeGenTarget::CSource || source == CodeGenTarget::CPPSource) { @@ -1326,9 +1326,9 @@ CapabilitySet TargetRequest::getTargetCaps() break; case CodeGenTarget::CPPSource: - case CodeGenTarget::Executable: - case CodeGenTarget::SharedLibrary: - case CodeGenTarget::HostCallable: + case CodeGenTarget::HostExecutable: + case CodeGenTarget::ShaderSharedLibrary: + case CodeGenTarget::ShaderHostCallable: atoms.add(CapabilityAtom::CPP); break; -- cgit v1.2.3