Web: Selectively remove a few key features, using #ifndef GLSLANG_WEB
Save about 100K.
N.B.: This is done by eliminating a function call, at a high level,
not by #ifdef'ing a bunch of code.
Also, removed no longer needed *_EXTENSION #ifdef in the code not
needed by GLSLANG_WEB.
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 8a17ce3..dea911b 100644
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -1592,9 +1592,11 @@
for (auto it = iOSet.cbegin(); it != iOSet.cend(); ++it)
entryPoint->addIdOperand(*it);
+#ifndef GLSLANG_WEB
// Add capabilities, extensions, remove unneeded decorations, etc.,
// based on the resulting SPIR-V.
builder.postProcess();
+#endif
}
// Write the SPV into 'out'.