diff options
Diffstat (limited to 'source/slang/dxc-support.cpp')
| -rw-r--r-- | source/slang/dxc-support.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/slang/dxc-support.cpp b/source/slang/dxc-support.cpp index 603a59ea7..cab94e74b 100644 --- a/source/slang/dxc-support.cpp +++ b/source/slang/dxc-support.cpp @@ -141,6 +141,28 @@ namespace Slang break; } + auto linkage = compileRequest->getLinkage(); + switch( linkage->optimizationLevel ) + { + default: + break; + + case OptimizationLevel::None: args[argCount++] = L"-Od"; break; + case OptimizationLevel::Default: args[argCount++] = L"-O1"; break; + case OptimizationLevel::High: args[argCount++] = L"-O2"; break; + case OptimizationLevel::Maximal: args[argCount++] = L"-O3"; break; + } + + switch( linkage->debugInfoLevel ) + { + case DebugInfoLevel::None: + break; + + default: + args[argCount++] = L"-Zi"; + break; + } + // Slang strives to produce correct code, and by default // we do not show the user warnings produced by a downstream // compiler. When the downstream compiler *does* produce an |
