From 401d8cdb12ae69aeb216c80c9bb90240d8359649 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 23 Feb 2024 16:39:46 -0800 Subject: Add slangc interface to compile and use ir modules. (#3615) * Add slangc interface to compile and use ir modules. * Fix glsl scalar layout settings not copied to target. * Fix. * Cleanups. --- source/slang/slang-compiler.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'source/slang/slang-compiler.cpp') diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index c0be68723..78aa4a18b 100644 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -1488,7 +1488,7 @@ namespace Slang // Add all of the module libraries libraries.addRange(linkage->m_libModules.getBuffer(), linkage->m_libModules.getCount()); } - + options.compilerSpecificArguments = allocator.allocate(compilerSpecificArguments); options.requiredCapabilityVersions = SliceUtil::asSlice(requiredCapabilityVersions); options.libraries = SliceUtil::asSlice(libraries); @@ -1879,14 +1879,7 @@ namespace Slang SerialContainerUtil::WriteOptions options; options.compressionType = linkage->m_optionSet.getEnumOption(CompilerOptionName::IrCompression); - if (linkage->m_optionSet.getBoolOption(CompilerOptionName::Obfuscate)) - { - // If code is obfuscated, we *disable* AST output as it is not obfuscated and will reveal - // too much about IR. - // Also currently only IR is needed. - options.optionFlags &= ~SerialOptionFlag::ASTModule; - } - + // If debug information is enabled, enable writing out source locs if (_shouldWriteSourceLocs(linkage)) { -- cgit v1.2.3