Add -g0 command line argument
Analogous to gcc, -g0 would strip all debug info. This is done regardless of whether optimizations are enabled. Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>
This commit is contained in:
parent
051c6fed88
commit
d52dce5067
4 changed files with 87 additions and 43 deletions
|
|
@ -8738,10 +8738,14 @@ void GlslangToSpv(const TIntermediate& intermediate, std::vector<unsigned int>&
|
|||
// If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan
|
||||
// eg. forward and remove memory writes of opaque types.
|
||||
bool prelegalization = intermediate.getSource() == EShSourceHlsl;
|
||||
if ((intermediate.getSource() == EShSourceHlsl || options->optimizeSize) && !options->disableOptimizer) {
|
||||
SpirvToolsLegalize(intermediate, spirv, logger, options);
|
||||
if ((prelegalization || options->optimizeSize) && !options->disableOptimizer) {
|
||||
SpirvToolsTransform(intermediate, spirv, logger, options);
|
||||
prelegalization = false;
|
||||
}
|
||||
else if (options->stripDebugInfo) {
|
||||
// Strip debug info even if optimization is disabled.
|
||||
SpirvToolsStripDebugInfo(intermediate, spirv, logger);
|
||||
}
|
||||
|
||||
if (options->validate)
|
||||
SpirvToolsValidate(intermediate, spirv, logger, prelegalization);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue