summaryrefslogtreecommitdiffstats
path: root/source/slang/compiler.cpp
diff options
context:
space:
mode:
authorTim Foley <tfoleyNV@users.noreply.github.com>2017-10-13 22:39:15 -0700
committerGitHub <noreply@github.com>2017-10-13 22:39:15 -0700
commit3e3e2473bf85365593629bd1f6f070d11f0b8ab2 (patch)
tree429dd72c135a43826a2aa29efe81b4de0915202b /source/slang/compiler.cpp
parent64ddefb90cf440df7879d1f2f9cc61de71e0f181 (diff)
Get rid of the `-slang-ir-asm` target (#212)
* Get rid of the `-slang-ir-asm` target This is really only useful for debugging, so I've replaced the functionality with a `-dump-ir` command line option (which dump's the IR for an entry point before doing codegen). * fixup: use HLSL target, not DXBC, so test can run on Linux
Diffstat (limited to 'source/slang/compiler.cpp')
-rw-r--r--source/slang/compiler.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/compiler.cpp b/source/slang/compiler.cpp
index d57c9b6cf..10755370a 100644
--- a/source/slang/compiler.cpp
+++ b/source/slang/compiler.cpp
@@ -559,6 +559,7 @@ namespace Slang
}
break;
+#if 0
case CodeGenTarget::SlangIRAssembly:
{
String code = emitSlangIRAssemblyForEntryPoint(entryPoint);
@@ -566,6 +567,7 @@ namespace Slang
result = CompileResult(code);
}
break;
+#endif
case CodeGenTarget::None:
// The user requested no output
@@ -818,6 +820,10 @@ namespace Slang
// If we are in command-line mode, we might be expected to actually
// write output to one or more files here.
+ // But don't write any output if we were told to skip it.
+ if (compileRequest->shouldSkipCodegen)
+ return;
+
if (compileRequest->isCommandLineCompile)
{
for( auto entryPoint : compileRequest->entryPoints )
@@ -910,9 +916,11 @@ namespace Slang
dumpIntermediateText(compileRequest, data, size, ".spv.asm");
break;
+#if 0
case CodeGenTarget::SlangIRAssembly:
dumpIntermediateText(compileRequest, data, size, ".slang-ir.asm");
break;
+#endif
case CodeGenTarget::SPIRV:
dumpIntermediateBinary(compileRequest, data, size, ".spv");