mesa: disable MSVC global optimization in pack.c
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 20 Jul 2012 22:16:11 +0000 (16:16 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 20 Jul 2012 22:23:22 +0000 (16:23 -0600)
To reduce excessive compilation time in release mode.

NOTE: This is a candidate for the 8.0 branch.

Tested-by: Brian Paul <brianp@vmware.com>
src/mesa/main/pack.c

index c25a02e855212f9b9f6a1066dcae0b0cf4c1b8ca..5fd01c2f8ef657812cbb5da8a38ab629ac251c5b 100644 (file)
  */
 
 
+/*
+ * XXX: MSVC takes forever to compile this module for x86_64 unless we disable
+ * this global optimization.
+ *
+ * See also:
+ * - http://msdn.microsoft.com/en-us/library/1yk3ydd7.aspx
+ * - http://msdn.microsoft.com/en-us/library/chh3fb0k.aspx
+ */
+#if defined(_MSC_VER) && defined(_M_X64)
+#  pragma optimize( "g", off )
+#endif
+
+
 #include "glheader.h"
 #include "colormac.h"
 #include "enums.h"