Skip to content

Commit 9baca41

Browse files
committed
build: always attempt to enable targeted sse42 cxxflags
This avoids a counter-intuitive drop in performance when manually adjusting the flags.
1 parent f66c596 commit 9baca41

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

configure.ac

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,14 +258,13 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
258258
AX_CHECK_COMPILE_FLAG([-Wunused-local-typedef],[CXXFLAGS="$CXXFLAGS -Wno-unused-local-typedef"],,[[$CXXFLAG_WERROR]])
259259
AX_CHECK_COMPILE_FLAG([-Wdeprecated-register],[CXXFLAGS="$CXXFLAGS -Wno-deprecated-register"],,[[$CXXFLAG_WERROR]])
260260
AX_CHECK_COMPILE_FLAG([-Wimplicit-fallthrough],[CXXFLAGS="$CXXFLAGS -Wno-implicit-fallthrough"],,[[$CXXFLAG_WERROR]])
261-
262-
# Check for optional instruction set support. Enabling these does _not_ imply that all code will
263-
# be compiled with them, rather that specific objects/libs may use them after checking for runtime
264-
# compatibility.
265-
AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]])
266-
267261
fi
268262

263+
# Check for optional instruction set support. Enabling these does _not_ imply that all code will
264+
# be compiled with them, rather that specific objects/libs may use them after checking for runtime
265+
# compatibility.
266+
AX_CHECK_COMPILE_FLAG([-msse4.2],[[SSE42_CXXFLAGS="-msse4.2"]],,[[$CXXFLAG_WERROR]])
267+
269268
TEMP_CXXFLAGS="$CXXFLAGS"
270269
CXXFLAGS="$CXXFLAGS $SSE42_CXXFLAGS"
271270
AC_MSG_CHECKING(for assembler crc32 support)

0 commit comments

Comments
 (0)