Browse Source

Added -fno-strict-aliasing option for shaderc to prevent glsl-optimizer from crashing.

bkaradzic 12 years ago
parent
commit
22815698ec
1 changed files with 5 additions and 0 deletions
  1. 5 0
      premake/shaderc.lua

+ 5 - 0
premake/shaderc.lua

@@ -22,6 +22,11 @@ project "shaderc"
 			"/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
 			"/wd4996" -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup.
 		}
 		}
 
 
+	configuration { "mingw or linux or osx" }
+		buildoptions {
+			"-fno-strict-aliasing" -- glsl-optimizer has bugs if strict aliasing is used.
+		}
+
 	configuration { "windows", "vs*" }
 	configuration { "windows", "vs*" }
 		includedirs {
 		includedirs {
 			GLSL_OPTIMIZER .. "include/c99",
 			GLSL_OPTIMIZER .. "include/c99",