[Qt] Build system fixes against V8.
authorhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2011 15:50:01 +0000 (15:50 +0000)
committerhausmann@webkit.org <hausmann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Nov 2011 15:50:01 +0000 (15:50 +0000)
Reviewed by Tor Arne Vestbø.

.:

* Source/api.pri: Get rid of old v8 cruft.
* WebKit.pro: Don't build JavaScriptCore when configured with v8.

Source/WebCore:

* DerivedSources.pri: Add missing binding files to the build and also added
the regexp table generation needed for Yarr, which is compiled statically into
WebCore to implement WebCore::RegularExpression.
* Target.pri: Adapt to latest v8 binding files.

Source/WebKit/qt:

Add forwarding headers for building against Qt's v8 with
v8 include style.

* v8/ForwardingHeaders/v8-debug.h: Added.
* v8/ForwardingHeaders/v8-preparser.h: Added.
* v8/ForwardingHeaders/v8-profiler.h: Added.
* v8/ForwardingHeaders/v8-testing.h: Added.
* v8/ForwardingHeaders/v8.h: Added.
* v8/ForwardingHeaders/v8stdint.h: Added.

Tools:

* qmake/mkspecs/features/webcore.prf: Get rid of old v8 cruft.
* qmake/mkspecs/features/wtf.prf: If requested, pull in v8 from Qt and configure
WTF accordingly to use v8. (WTF in the implementation needs it as well as users of WTF)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@101262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

16 files changed:
ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/DerivedSources.pri
Source/WebCore/Target.pri
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8.h [new file with mode: 0644]
Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h [new file with mode: 0644]
Source/api.pri
Tools/ChangeLog
Tools/qmake/mkspecs/features/webcore.prf
Tools/qmake/mkspecs/features/wtf.prf
WebKit.pro

index 6e3d1b6..94e857c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
 
+        [Qt] Build system fixes against V8.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * Source/api.pri: Get rid of old v8 cruft.
+        * WebKit.pro: Don't build JavaScriptCore when configured with v8.
+
+2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
+
         [Qt] WTF should be built as separate static library
         https://bugs.webkit.org/show_bug.cgi?id=73201
 
index ced2b58..94f1855 100644 (file)
@@ -1,3 +1,14 @@
+2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
+
+        [Qt] Build system fixes against V8.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * DerivedSources.pri: Add missing binding files to the build and also added
+        the regexp table generation needed for Yarr, which is compiled statically into
+        WebCore to implement WebCore::RegularExpression.
+        * Target.pri: Adapt to latest v8 binding files.
+
 2011-11-28  Andrey Kosyakov  <caseq@chromium.org>
 
         Web Inspector: resource status image is mis-aligned in the network headers view
index 13aa54c..d0e853e 100644 (file)
@@ -65,6 +65,8 @@ INJECTED_SCRIPT_SOURCE = $$PWD/inspector/InjectedScriptSource.js
 
 DEBUGGER_SCRIPT_SOURCE = $$PWD/bindings/v8/DebuggerScript.js
 
+ARRAY_BUFFER_VIEW_CUSTOM_SCRIPT_SOURCE = $$PWD/bindings/v8/custom/V8ArrayBufferViewCustomScript.js
+
 contains(DEFINES, ENABLE_DASHBOARD_SUPPORT=1): DASHBOARDSUPPORTCSSPROPERTIES = $$PWD/css/DashboardSupportCSSPropertyNames.in
 
 XPATHBISON = $$PWD/xml/XPathGrammar.y
@@ -719,6 +721,12 @@ debuggerScriptSource.commands = perl $$PWD/inspector/xxd.pl DebuggerScriptSource
 debuggerScriptSource.add_output_to_sources = false
 GENERATORS += debuggerScriptSource
 
+arrayBufferViewCustomScript.output = V8ArrayBufferViewCustomScript.h
+arrayBufferViewCustomScript.input = ARRAY_BUFFER_VIEW_CUSTOM_SCRIPT_SOURCE
+arrayBufferViewCustomScript.commands = perl $$PWD/inspector/xxd.pl V8ArrayBufferViewCustomScript_js ${QMAKE_FILE_IN} ${QMAKE_FILE_OUT}
+arrayBufferViewCustomScript.add_output_to_sources = false
+GENERATORS += arrayBufferViewCustomScript
+
 # GENERATOR 3: tokenizer (flex)
 tokenizer.output = ${QMAKE_FILE_BASE}.cpp
 tokenizer.input = TOKENIZER
@@ -862,3 +870,12 @@ webkitversion.commands = perl $$webkitversion.script --config $$PWD/../WebKit/ma
 webkitversion.clean = ${QMAKE_FUNC_FILE_OUT_PATH}/WebKitVersion.h
 webkitversion.add_output_to_sources = false
 GENERATORS += webkitversion
+
+# Stolen from JavaScriptCore, needed for YARR
+v8 {
+    retgen.output = RegExpJitTables.h
+    retgen.script = $$PWD/../JavaScriptCore/create_regex_tables
+    retgen.input = retgen.script
+    retgen.commands = python $$retgen.script > ${QMAKE_FILE_OUT}
+    GENERATORS += retgen
+}
index 025e5a1..bf1201c 100644 (file)
@@ -67,9 +67,6 @@ SOURCES += \
 
 v8 {
     include($$PWD/../JavaScriptCore/yarr/yarr.pri)
-    include($$PWD/../JavaScriptCore/wtf/wtf.pri)
-
-    INCLUDEPATH = $$PWD/../JavaScriptCore/wtf/qt $$INCLUDEPATH
 
     SOURCES += \
         platform/qt/PlatformSupportQt.cpp \
@@ -83,6 +80,7 @@ v8 {
 
     SOURCES += \
         bindings/v8/custom/V8ArrayBufferCustom.cpp \
+        bindings/v8/custom/V8ArrayBufferViewCustom.cpp \
         bindings/v8/custom/V8CustomXPathNSResolver.cpp \
         bindings/v8/custom/V8DataViewCustom.cpp \
         bindings/v8/custom/V8DeviceMotionEventCustom.cpp \
@@ -100,6 +98,7 @@ v8 {
         bindings/v8/DOMData.cpp \
         bindings/v8/DOMDataStore.cpp \
         bindings/v8/NPV8Object.cpp \
+        bindings/v8/OptionsObject.cpp \
         bindings/v8/PageScriptDebugServer.cpp \
         bindings/v8/RetainedDOMInfo.cpp \
         bindings/v8/ScheduledAction.cpp \
@@ -1350,7 +1349,6 @@ v8 {
         bindings/v8/custom/V8CustomXPathNSResolver.h \
         bindings/v8/custom/V8HTMLImageElementConstructor.h \
         bindings/v8/custom/V8HTMLSelectElementCustom.h \
-        bindings/v8/custom/V8MessagePortCustom.h \
         bindings/v8/custom/V8NamedNodesCollection.h \
         \
         bindings/v8/DateExtension.h \
index 4580c9a..32760d6 100644 (file)
@@ -1,3 +1,19 @@
+2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
+
+        [Qt] Build system fixes against V8.
+
+        Reviewed by Tor Arne Vestbø.
+
+        Add forwarding headers for building against Qt's v8 with
+        v8 include style.
+
+        * v8/ForwardingHeaders/v8-debug.h: Added.
+        * v8/ForwardingHeaders/v8-preparser.h: Added.
+        * v8/ForwardingHeaders/v8-profiler.h: Added.
+        * v8/ForwardingHeaders/v8-testing.h: Added.
+        * v8/ForwardingHeaders/v8.h: Added.
+        * v8/ForwardingHeaders/v8stdint.h: Added.
+
 2011-11-26  Pavel Feldman  <pfeldman@google.com>
 
         Web Inspector: remove disconnectFromBackend from the protocol.
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-debug.h
new file mode 100644 (file)
index 0000000..e6bfdb7
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-debug.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-preparser.h
new file mode 100644 (file)
index 0000000..7198b74
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-preparser.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-profiler.h
new file mode 100644 (file)
index 0000000..37fbebd
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-profiler.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8-testing.h
new file mode 100644 (file)
index 0000000..d62f8f9
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8-testing.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8.h
new file mode 100644 (file)
index 0000000..195f5fb
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8.h>
diff --git a/Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h b/Source/WebKit/qt/v8/ForwardingHeaders/v8stdint.h
new file mode 100644 (file)
index 0000000..850e670
--- /dev/null
@@ -0,0 +1 @@
+#include <private/v8stdint.h>
index 0a5d18c..943caea 100644 (file)
@@ -30,11 +30,6 @@ CONFIG += webcore
     QMAKE_INTERNAL_INCLUDED_FILES *= WebKit2/Target.pri
 }
 
-v8:linux-* {
-    QMAKE_LIBDIR += $${V8_LIB_DIR}
-    LIBS = -lv8 $$LIBS
-}
-
 QT += network
 haveQt(5): QT += widgets printsupport
 
index 0f3befe..4f51521 100644 (file)
@@ -1,3 +1,13 @@
+2011-11-28  Simon Hausmann  <simon.hausmann@nokia.com>
+
+        [Qt] Build system fixes against V8.
+
+        Reviewed by Tor Arne Vestbø.
+
+        * qmake/mkspecs/features/webcore.prf: Get rid of old v8 cruft.
+        * qmake/mkspecs/features/wtf.prf: If requested, pull in v8 from Qt and configure
+        WTF accordingly to use v8. (WTF in the implementation needs it as well as users of WTF)
+
 2011-11-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
 
         Make sure the useFixedLayout feature is consistently handled
index 046e963..5e85225 100644 (file)
@@ -25,21 +25,7 @@ else: WEBCORE_DESTDIR = release
 WEBCORE_GENERATED_SOURCES_DIR = $${ROOT_BUILD_DIR}/Source/WebCore/$${GENERATED_SOURCES_DESTDIR}
 
 v8 {
-    !haveQt(5): error("To build QtWebKit+V8 you need qtscript-staging's v8 branch. (See: http://qt.gitorious.org/+qt-developers/qt/qtscript-staging)")
-    !exists($${V8_DIR}$${QMAKE_DIR_SEP}include$${QMAKE_DIR_SEP}v8.h): error("Cannot build with V8. Needed file $${V8_DIR}$${QMAKE_DIR_SEP}include$${QMAKE_DIR_SEP}v8.h does not exist.")
-    !exists($${V8_LIB_DIR}$${QMAKE_DIR_SEP}libv8.a): error("Cannot build with V8. Needed library $${V8_LIB_DIR}$${QMAKE_DIR_SEP}libv8.a does not exist.")
-
-    message(Using V8 with QtScript)
-
-    V8_DIR = $$[QT_INSTALL_PREFIX]/src/3rdparty/v8
-    V8_LIB_DIR = $$[QT_INSTALL_PREFIX]/src/script/v8
-
-    QT += script
-    INCLUDEPATH += $${V8_DIR}/include
-
     DEFINES *= V8_BINDING=1
-    DEFINES *= WTF_CHANGES=1
-    DEFINES *= WTF_USE_V8=1
 
     WEBCORE_INCLUDEPATH = \
         $$SOURCE_DIR/WebCore/bindings/v8 \
index ee4858e..0e14bba 100644 (file)
@@ -36,6 +36,13 @@ contains(CONFIG, use_system_icu) {
     DEFINES -= WTF_USE_ICU_UNICODE
 }
 
+v8 {
+    !haveQt(5): error("To build QtWebKit+V8 you need to use Qt 5")
+    DEFINES *= WTF_USE_V8=1
+    INCLUDEPATH += $${ROOT_WEBKIT_DIR}/Source/WebKit/qt/v8/ForwardingHeaders
+    QT += v8-private declarative
+}
+
 linux-*:!contains(DEFINES, USE_QTMULTIMEDIA=1) {
     !contains(QT_CONFIG, no-pkg-config):system(pkg-config --exists glib-2.0 gio-2.0 gstreamer-0.10): {
         DEFINES += ENABLE_GLIB_SUPPORT=1
index c301cfe..95a3e29 100644 (file)
@@ -18,7 +18,7 @@ WTF.file = Source/JavaScriptCore/wtf/wtf.pro
 WTF.makefile = Makefile.WTF
 SUBDIRS += WTF
 
-!CONFIG(v8) {
+!v8 {
     JavaScriptCore.file = Source/JavaScriptCore/JavaScriptCore.pro
     JavaScriptCore.makefile = Makefile.JavaScriptCore