From 6fc2c37d9a4c408331db1b33deb3b46e74d2a7d2 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 12 Aug 2019 15:41:41 -0400 Subject: Callable CPU code support (#1014) * First pass support for compiling to a loaded shared library. * Improve documentation for cpu target. * Removed the SLANG_COMPILE_FLAG_LOAD_SHARED_LIBRARY flag. Use the SLANG_HOST_CALLABLE code target Document mechanism. * Fix typo in cpp-resource.slang In test code if the target is 'callable' we don't need to compile (indeed there is no source file). * Small refactor using CommandLineCPPCompiler as base class to implement VisualStudioCPPCompiler and GCCCPPCompiler. * Improvements around CPPCompiler. Mechanism to know products produced. Cleaning up products after execution. * Fix multiple definition of 'SourceType' --- source/core/windows/slang-win-visual-studio-util.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/core/windows/slang-win-visual-studio-util.cpp') diff --git a/source/core/windows/slang-win-visual-studio-util.cpp b/source/core/windows/slang-win-visual-studio-util.cpp index a406e168f..260f3f56f 100644 --- a/source/core/windows/slang-win-visual-studio-util.cpp +++ b/source/core/windows/slang-win-visual-studio-util.cpp @@ -290,10 +290,8 @@ static SlangResult _find(int versionIndex, WinVisualStudioUtil::VersionPath& out VersionPath versionPath; if (!set->getCompiler(desc) && SLANG_SUCCEEDED(_find(i, versionPath))) { - CommandLine cmdLine; - calcExecuteCompilerArgs(versionPath, cmdLine); - - RefPtr compiler = new GenericCPPCompiler(desc, cmdLine, &VisualStudioCompilerUtil::calcArgs, &VisualStudioCompilerUtil::parseOutput, &VisualStudioCompilerUtil::calcModuleFilePath); + RefPtr compiler = new VisualStudioCPPCompiler(desc); + calcExecuteCompilerArgs(versionPath, compiler->m_cmdLine); set->addCompiler(compiler); } } -- cgit v1.2.3