Bug 1080968 - Don't use constexpr on clang-cl when emulating MSVC 2013
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 27 Jan 2016 21:00:32 -0500
changeset 282028 4cc67dcae188709e30836aa91636dc46c4740cce
parent 282027 d81da0ef528d262e373ce4516337ff2565b66699
child 282029 ebf10602138c324c9d2a15ce317debc33ab849e1
push id71007
push usereakhgari@mozilla.com
push dateThu, 28 Jan 2016 02:35:55 +0000
treeherdermozilla-inbound@4cc67dcae188 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1080968
milestone47.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1080968 - Don't use constexpr on clang-cl when emulating MSVC 2013 constexpr-ness of things can change the ABI requirements, and MSVC 2013 doesn't support constexpr, so choosing it for clang-cl when emulating MSVC 2013 will cause ABI incomap issues between object files compiled with the two compilers. This reverts part of the commit for the original bug.
mfbt/Attributes.h
--- a/mfbt/Attributes.h
+++ b/mfbt/Attributes.h
@@ -53,20 +53,17 @@
 #  define MOZ_HAVE_NEVER_INLINE          __declspec(noinline)
 #  define MOZ_HAVE_NORETURN              __declspec(noreturn)
 #  if _MSC_VER >= 1900
 #    define MOZ_HAVE_CXX11_CONSTEXPR
 #    define MOZ_HAVE_CXX11_CONSTEXPR_IN_TEMPLATES
 #    define MOZ_HAVE_EXPLICIT_CONVERSION
 #  endif
 #  ifdef __clang__
-     /* clang-cl probably supports constexpr and explicit conversions. */
-#    if __has_extension(cxx_constexpr)
-#      define MOZ_HAVE_CXX11_CONSTEXPR
-#    endif
+     /* clang-cl probably supports explicit conversions. */
 #    if __has_extension(cxx_explicit_conversions)
 #      define MOZ_HAVE_EXPLICIT_CONVERSION
 #    endif
 #  endif
 #elif defined(__clang__)
    /*
     * Per Clang documentation, "Note that marketing version numbers should not
     * be used to check for language features, as different vendors use different