aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.qmake.conf13
-rw-r--r--src/qml/qml/v4/qv4stacktrace.cpp13
2 files changed, 13 insertions, 13 deletions
diff --git a/.qmake.conf b/.qmake.conf
index 4baafa83df..f21f463f3c 100644
--- a/.qmake.conf
+++ b/.qmake.conf
@@ -2,3 +2,16 @@ load(qt_build_config)
CONFIG += qt_example_installs
MODULE_VERSION = 5.2.0
+
+# For the JS engine we need to be able to produce back traces,
+# and as we're using the C stack, we need the system to be able
+# to walk it properly. Unfortunately on Windows with i386 there
+# are no unwind tables, that can compensate for an omitted frame
+# pointer, so we have no choice but to disable the frame pointer
+# omission optimizations.
+# Only within the qtdeclarative module we support throwing V4
+# exceptions, hence the choice of applying this change here.
+win32:equals(QT_ARCH, "i386") {
+ *msvc*: QMAKE_CXXFLAGS += -Oy-
+ *g++*: QMAKE_CXXFLAGS += -fno-omit-frame-pointer
+}
diff --git a/src/qml/qml/v4/qv4stacktrace.cpp b/src/qml/qml/v4/qv4stacktrace.cpp
index a96824e420..1cc2e53556 100644
--- a/src/qml/qml/v4/qv4stacktrace.cpp
+++ b/src/qml/qml/v4/qv4stacktrace.cpp
@@ -54,19 +54,6 @@
#include <execinfo.h>
#endif
-#if defined(Q_OS_WIN)
-// We call RtlCaptureContext and that will crash if the compiler did not
-// create a stack frame for the function that calls RtlCaptureContext.
-#if defined(Q_CC_MSVC)
-#pragma optimize( "y", off )
-#elif defined(Q_CC_GNU)
-#pragma GCC optimize ("O0")
-#else
-#error "Don't know how to disable frame pointer optimizations with this compiler on Windows!"
-#endif
-
-#endif
-
QT_BEGIN_NAMESPACE
using namespace QV4;