]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/tools/compilationunits.sh
Merge branch 'master' into Mario/campaign_mapinfo_fix_v2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / tools / compilationunits.sh
index e3d1eb01368df1c714c55d7264eda99e89ff8bbd..7a7ff17b6d554cbe6451ae2dda773ec81b017088 100755 (executable)
@@ -38,6 +38,11 @@ QCCDEFS="${QCCDEFS[@]}"
 
 declare -a QCCFLAGS=(
     -std=gmqcc
+    # Without -O3, GMQCC thinks some variables are used uninitialized if the initialization is done inside an `if (1)` block
+    # (which is created by e.g. BEGIN_MACRO) which would cause the compilation units test to fail.
+    # There doesn't appear to be any measurable increase in compile time
+    # and it allows us to get rid of some explicit initializations which are just useless noise.
+    -O3
     -Wall -Werror
     -futf8
     -freturn-assignments