summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-29 11:03:26 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-05-29 11:40:02 +0000
commit540119ba890eb25836980c433d041b687428fdb2 (patch)
tree76891d7eea366eb324efe4cc15db1190b762288e
parentef31021c3ec96a70777217f1f613f7d27d6f5a15 (diff)
Support MSVC 2015
Fixes building qtwebkit with MSVC 2015 Change-Id: I94b085ab822b3cdfa911814467e051c11c93d79e Task-number: QTBUG-46344 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
-rw-r--r--Source/JavaScriptCore/jsc.pro2
-rw-r--r--Source/ThirdParty/ANGLE/src/common/angleutils.h2
-rw-r--r--Source/WTF/WTF.pri2
-rw-r--r--Source/WTF/wtf/StringExtras.h2
-rw-r--r--Source/WTF/wtf/TypeTraits.h2
-rw-r--r--Source/WebCore/WebCore.pri4
6 files changed, 9 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/jsc.pro b/Source/JavaScriptCore/jsc.pro
index dfd73e825..91ebcc2a0 100644
--- a/Source/JavaScriptCore/jsc.pro
+++ b/Source/JavaScriptCore/jsc.pro
@@ -13,7 +13,7 @@ QT -= gui
win32-*: CONFIG += console
win32-msvc*: CONFIG += exceptions_off stl_off
-win32-msvc*|win32-icc: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
+win32-msvc2005|win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|win32-icc: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
WEBKIT += javascriptcore wtf
diff --git a/Source/ThirdParty/ANGLE/src/common/angleutils.h b/Source/ThirdParty/ANGLE/src/common/angleutils.h
index 9761567fb..4736518e7 100644
--- a/Source/ThirdParty/ANGLE/src/common/angleutils.h
+++ b/Source/ThirdParty/ANGLE/src/common/angleutils.h
@@ -42,7 +42,7 @@ void SafeRelease(T& resource)
}
}
-#if defined(_MSC_VER)
+#if defined(_MSC_VER) && _MSC_VER < 1900
#define snprintf _snprintf
#endif
diff --git a/Source/WTF/WTF.pri b/Source/WTF/WTF.pri
index bb130f6a4..b4f7765ac 100644
--- a/Source/WTF/WTF.pri
+++ b/Source/WTF/WTF.pri
@@ -49,4 +49,4 @@ mac {
}
# MSVC is lacking stdint.h as well as inttypes.h.
-win32-msvc*|win32-icc|wince*: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
+win32-msvc2005|win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|win32-icc|wince*: INCLUDEPATH += $$ROOT_WEBKIT_DIR/Source/JavaScriptCore/os-win32
diff --git a/Source/WTF/wtf/StringExtras.h b/Source/WTF/wtf/StringExtras.h
index eaf0cf76a..1afd0f992 100644
--- a/Source/WTF/wtf/StringExtras.h
+++ b/Source/WTF/wtf/StringExtras.h
@@ -37,6 +37,7 @@
#if COMPILER(MSVC)
// FIXME: why a COMPILER check instead of OS? also, these should be HAVE checks
+#if _MSC_VER < 1900
inline int snprintf(char* buffer, size_t count, const char* format, ...)
{
int result;
@@ -52,6 +53,7 @@ inline int snprintf(char* buffer, size_t count, const char* format, ...)
return result;
}
+#endif
inline double wtf_vsnprintf(char* buffer, size_t count, const char* format, va_list args)
{
diff --git a/Source/WTF/wtf/TypeTraits.h b/Source/WTF/wtf/TypeTraits.h
index b9e46bc55..9df2c95cf 100644
--- a/Source/WTF/wtf/TypeTraits.h
+++ b/Source/WTF/wtf/TypeTraits.h
@@ -238,7 +238,7 @@ namespace WTF {
template <typename T> struct HasTrivialDestructor {
static const bool value = __has_trivial_destructor(T) || IsPod<RemoveConstVolatile<T> >::value;
};
-#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
+#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600 && _MSC_VER < 1900))
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.
template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
diff --git a/Source/WebCore/WebCore.pri b/Source/WebCore/WebCore.pri
index 915a1a468..4e5e13cba 100644
--- a/Source/WebCore/WebCore.pri
+++ b/Source/WebCore/WebCore.pri
@@ -289,10 +289,12 @@ win32 {
}
# Remove whole program optimizations due to miscompilations
-win32-msvc2005|win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|wince*:{
+win32-msvc2005|win32-msvc2008|win32-msvc2010|win32-msvc2012|win32-msvc2013|wince* {
QMAKE_CFLAGS_LTCG -= -GL
QMAKE_CXXFLAGS_LTCG -= -GL
+}
+win32-msvc*|wince* {
# Disable incremental linking for windows 32bit OS debug build as WebKit is so big
# that linker failes to link incrementally in debug mode.
ARCH = $$(PROCESSOR_ARCHITECTURE)