Don't build V8 as a static library
authorKent Hansen <kent.hansen@nokia.com>
Tue, 26 Jul 2011 10:53:00 +0000 (12:53 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 26 Jul 2011 12:15:07 +0000 (14:15 +0200)
In the future, we'll need to be able to export the V8
symbols from the QtDeclarative library, which requires
compiling V8 straight in. It's not possible to achieve
this using a static library.

Change-Id: Ie9e31984d2c03639a311cef11ddd33ba0aa15fd9
Reviewed-on: http://codereview.qt.nokia.com/2187
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>

16 files changed:
src/declarative/declarative.pro
src/declarative/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch [moved from src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch with 100% similarity]
src/declarative/v8/0002-Add-a-bit-field-3-to-Map.patch [moved from src/v8/0002-Add-a-bit-field-3-to-Map.patch with 100% similarity]
src/declarative/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch [moved from src/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch with 100% similarity]
src/declarative/v8/0004-Generalize-external-object-resources.patch [moved from src/v8/0004-Generalize-external-object-resources.patch with 100% similarity]
src/declarative/v8/0005-Introduce-a-QML-compilation-mode.patch [moved from src/v8/0005-Introduce-a-QML-compilation-mode.patch with 100% similarity]
src/declarative/v8/0006-Allow-access-to-the-calling-script-data.patch [moved from src/v8/0006-Allow-access-to-the-calling-script-data.patch with 100% similarity]
src/declarative/v8/0007-Fix-warnings.patch [moved from src/v8/0007-Fix-warnings.patch with 100% similarity]
src/declarative/v8/0008-Add-custom-object-compare-callback.patch [moved from src/v8/0008-Add-custom-object-compare-callback.patch with 100% similarity]
src/declarative/v8/README [moved from src/v8/README with 100% similarity]
src/declarative/v8/v8.pri [moved from src/v8/v8.pro with 97% similarity]
src/declarative/v8/v8base.pri [moved from src/v8/v8base.pri with 93% similarity]
src/declarative/v8/wrapcc.pl [moved from src/v8/wrapcc.pl with 100% similarity]
src/src.pro
tests/auto/declarative/v8/Makefile.nonqt
tests/auto/declarative/v8/v8.pro

index a4aab38..aa638e4 100644 (file)
@@ -33,6 +33,7 @@ include(debugger/debugger.pri)
 include(scenegraph/scenegraph.pri)
 include(items/items.pri)
 include(particles/particles.pri)
+include(v8/v8.pri)
 
 symbian: {
     TARGET.UID3=0x2001E623
@@ -52,8 +53,3 @@ DEFINES += QT_NO_OPENTYPE
 INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty/harfbuzz/src
 
 
-macx:CONFIG(debug, debug|release) {
-    QMAKE_LIBS_PRIVATE += -L../v8/ -lv8_debug
-} else {
-    QMAKE_LIBS_PRIVATE += -L../v8/ -lv8
-}
similarity index 100%
rename from src/v8/README
rename to src/declarative/v8/README
similarity index 97%
rename from src/v8/v8.pro
rename to src/declarative/v8/v8.pri
index bc1837a..c526fcc 100644 (file)
@@ -1,15 +1,3 @@
-TEMPLATE = lib
-CONFIG += staticlib
-
-CONFIG += building-libs
-
-QT =
-
-win32|mac:!macx-xcode:CONFIG += debug_and_release
-macx:CONFIG(debug, debug|release) {
-   TARGET = v8_debug
-}
-
 equals(QT_ARCH, x86_64)|contains(CONFIG, x86_64):CONFIG += arch_x86_64
 else:equals(QT_ARCH, "i386"):CONFIG += arch_i386
 else:equals(QT_ARCH, "arm"):CONFIG += arch_arm
@@ -18,6 +6,8 @@ include($$PWD/v8base.pri)
 
 V8_GENERATED_SOURCES_DIR = generated
 
+DEFINES += V8_SHARED BUILDING_V8_SHARED
+
 # this maybe removed in future
 DEFINES += ENABLE_DEBUGGER_SUPPORT
 
similarity index 93%
rename from src/v8/v8base.pri
rename to src/declarative/v8/v8base.pri
index f57663e..209e4d5 100644 (file)
@@ -1,6 +1,6 @@
 V8DIR = $$(V8DIR)
 isEmpty(V8DIR) {
-    V8DIR = $$PWD/../3rdparty/v8
+    V8DIR = $$PWD/../../3rdparty/v8
 } else {
     message(using external V8 from $$V8DIR)
 }
index 1fa93c5..a8a33a7 100644 (file)
@@ -1,5 +1,5 @@
 TEMPLATE = subdirs
 CONFIG += ordered
-SUBDIRS += v8 declarative qtquick1 plugins
+SUBDIRS += declarative qtquick1 plugins
 contains(QT_CONFIG, qmltest): SUBDIRS += qmltest
 SUBDIRS += imports
index 20be72e..7ab695b 100644 (file)
@@ -1,11 +1,11 @@
 release-m32:
-       g++ -o v8test_release_m32 -m32 -O2 v8main.cpp v8test.cpp -L../../../../src/3rdparty/v8/ -lv8
+       g++ -o v8test_release_m32 -m32 -O2 v8main.cpp v8test.cpp -lpthread -L../../../../src/3rdparty/v8/ -lv8
 
 debug-m32:
-       g++ -o v8test_debug_m32 -m32 -g v8main.cpp v8test.cpp -L../../../../src/3rdparty/v8/ -lv8_g
+       g++ -o v8test_debug_m32 -m32 -g v8main.cpp v8test.cpp -lpthread -L../../../../src/3rdparty/v8/ -lv8_g
 
 release:
-       g++ -o v8test_release -O2 v8main.cpp v8test.cpp -L../../../../src/3rdparty/v8/ -lv8
+       g++ -o v8test_release -O2 v8main.cpp v8test.cpp -lpthread -L../../../../src/3rdparty/v8/ -lv8
 
 debug:
-       g++ -o v8test_debug -g v8main.cpp v8test.cpp -L../../../../src/3rdparty/v8/ -lv8_g
+       g++ -o v8test_debug -g v8main.cpp v8test.cpp -lpthread -L../../../../src/3rdparty/v8/ -lv8_g
index 1030d17..bd6dfa9 100644 (file)
@@ -6,10 +6,5 @@ HEADERS += v8test.h
 
 CONFIG += parallel_test
 
-LIBS += -L../../../../src/v8/
-macx:CONFIG(debug, debug|release) {
-    LIBS += -lv8_debug 
-} else {
-    LIBS += -lv8 
-}
-
+QT += declarative
+DEFINES += USING_V8_SHARED