mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-24 18:55:30 +00:00
bug 877937 - build the js engine in c++11 mode when we do that for the rest of the tree r=ted
This commit is contained in:
parent
2616658199
commit
c23adc3563
@ -2332,6 +2332,35 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
dnl Check whether we can use gcc's c++0x mode
|
||||
AC_LANG_CPLUSPLUS
|
||||
|
||||
if test "$GNU_CXX"; then
|
||||
_SAVE_CXXFLAGS=$CXXFLAGS
|
||||
CXXFLAGS="$CXXFLAGS -std=gnu++0x"
|
||||
|
||||
AC_CACHE_CHECK(for gcc c++0x headers bug without rtti,
|
||||
ac_cv_cxx0x_headers_bug,
|
||||
[AC_TRY_COMPILE([#include <memory>], [],
|
||||
ac_cv_cxx0x_headers_bug="no",
|
||||
ac_cv_cxx0x_headers_bug="yes")])
|
||||
|
||||
if test "$CLANG_CXX" -a "$ac_cv_cxx0x_headers_bug" = "yes"; then
|
||||
CXXFLAGS="$CXXFLAGS -I$_topsrcdir/build/unix/headers"
|
||||
AC_CACHE_CHECK(whether workaround for gcc c++0x headers conflict with clang works,
|
||||
ac_cv_cxx0x_clang_workaround,
|
||||
[AC_TRY_COMPILE([#include <memory>], [],
|
||||
ac_cv_cxx0x_clang_workaround="yes",
|
||||
ac_cv_cxx0x_clang_workaround="no")])
|
||||
|
||||
if test "ac_cv_cxx0x_clang_workaround" = "no"; then
|
||||
CXXFLAGS="$_SAVE_CXXFLAGS"
|
||||
fi
|
||||
elif test "$ac_cv_cxx0x_headers_bug" = "yes"; then
|
||||
CXXFLAGS="$_SAVE_CXXFLAGS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_LANG_C
|
||||
|
||||
dnl Check for .hidden assembler directive and visibility attribute.
|
||||
|
Loading…
Reference in New Issue
Block a user