Bug 1298470 - use the correct SSSE3_FLAGS for clang-cl; r?glandium draft
authorNathan Froyd <froydnj@mozilla.com>
Thu, 25 Aug 2016 17:10:25 -0400
changeset 406287 bcea7b71027d61dd22309b81d4ce351b70ab2729
parent 406286 95331ac47e2494efa085b0a764ed8ba055b893c5
child 406288 9634da995479dc1a4afad658fdeb88ce4c1aab47
push id27678
push userbmo:nfroyd@mozilla.com
push dateFri, 26 Aug 2016 19:10:01 +0000
reviewersglandium
bugs1298470
milestone51.0a1
Bug 1298470 - use the correct SSSE3_FLAGS for clang-cl; r?glandium MSVC allows one to specify -arch:SSE2 and enable all SSE2+ instructions. clang-cl is pickier and wants you to specify -mssse3. MozReview-Commit-ID: EqDgoJ5A54V
old-configure.in
--- a/old-configure.in
+++ b/old-configure.in
@@ -1083,16 +1083,20 @@ case "$target" in
             if test -z `echo $CXXFLAGS | grep -i [-/]arch:`; then
               CXXFLAGS="$CXXFLAGS -arch:SSE2"
             fi
             SSE_FLAGS="-arch:SSE"
             SSE2_FLAGS="-arch:SSE2"
             dnl MSVC allows the use of intrinsics without any flags
             dnl and doesn't have a separate arch for SSSE3
             SSSE3_FLAGS="-arch:SSE2"
+            dnl clang-cl, however, requires the appropriate flags.
+            if test -n "$CLANG_CL"; then
+                SSSE3_FLAGS="-mssse3"
+            fi
         fi
         dnl VS2013+ requires -FS when parallel building by make -jN.
         dnl If nothing, compiler sometimes causes C1041 error.
         CFLAGS="$CFLAGS -FS"
         CXXFLAGS="$CXXFLAGS -FS"
         # khuey says we can safely ignore MSVC warning C4251
         # MSVC warning C4244 (implicit type conversion may lose data) warns
         # and requires workarounds for perfectly valid code.  Also, GCC/clang