From c1c0b9c03cec9c5962e694bfc3e939e1504e6e59 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 26 Jul 2011 12:53:00 +0200 Subject: [PATCH] Don't build V8 as a static library 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 Reviewed-by: Simon Hausmann --- src/declarative/declarative.pro | 6 +----- ...1-Add-hashing-and-comparison-methods-to-v8-String.patch | 0 .../v8/0002-Add-a-bit-field-3-to-Map.patch | 0 ...d-a-fallback-mode-for-named-property-interceptors.patch | 0 .../v8/0004-Generalize-external-object-resources.patch | 0 .../v8/0005-Introduce-a-QML-compilation-mode.patch | 0 .../v8/0006-Allow-access-to-the-calling-script-data.patch | 0 src/{ => declarative}/v8/0007-Fix-warnings.patch | 0 .../v8/0008-Add-custom-object-compare-callback.patch | 0 src/{ => declarative}/v8/README | 0 src/{v8/v8.pro => declarative/v8/v8.pri} | 14 ++------------ src/{ => declarative}/v8/v8base.pri | 2 +- src/{ => declarative}/v8/wrapcc.pl | 0 src/src.pro | 2 +- tests/auto/declarative/v8/Makefile.nonqt | 8 ++++---- tests/auto/declarative/v8/v8.pro | 9 ++------- 16 files changed, 11 insertions(+), 30 deletions(-) rename src/{ => declarative}/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch (100%) rename src/{ => declarative}/v8/0002-Add-a-bit-field-3-to-Map.patch (100%) rename src/{ => declarative}/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch (100%) rename src/{ => declarative}/v8/0004-Generalize-external-object-resources.patch (100%) rename src/{ => declarative}/v8/0005-Introduce-a-QML-compilation-mode.patch (100%) rename src/{ => declarative}/v8/0006-Allow-access-to-the-calling-script-data.patch (100%) rename src/{ => declarative}/v8/0007-Fix-warnings.patch (100%) rename src/{ => declarative}/v8/0008-Add-custom-object-compare-callback.patch (100%) rename src/{ => declarative}/v8/README (100%) rename src/{v8/v8.pro => declarative/v8/v8.pri} (97%) rename src/{ => declarative}/v8/v8base.pri (93%) rename src/{ => declarative}/v8/wrapcc.pl (100%) diff --git a/src/declarative/declarative.pro b/src/declarative/declarative.pro index a4aab38..aa638e4 100644 --- a/src/declarative/declarative.pro +++ b/src/declarative/declarative.pro @@ -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 -} diff --git a/src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch b/src/declarative/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch similarity index 100% rename from src/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch rename to src/declarative/v8/0001-Add-hashing-and-comparison-methods-to-v8-String.patch diff --git a/src/v8/0002-Add-a-bit-field-3-to-Map.patch b/src/declarative/v8/0002-Add-a-bit-field-3-to-Map.patch similarity index 100% rename from src/v8/0002-Add-a-bit-field-3-to-Map.patch rename to src/declarative/v8/0002-Add-a-bit-field-3-to-Map.patch diff --git a/src/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch b/src/declarative/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch similarity index 100% rename from src/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch rename to src/declarative/v8/0003-Add-a-fallback-mode-for-named-property-interceptors.patch diff --git a/src/v8/0004-Generalize-external-object-resources.patch b/src/declarative/v8/0004-Generalize-external-object-resources.patch similarity index 100% rename from src/v8/0004-Generalize-external-object-resources.patch rename to src/declarative/v8/0004-Generalize-external-object-resources.patch diff --git a/src/v8/0005-Introduce-a-QML-compilation-mode.patch b/src/declarative/v8/0005-Introduce-a-QML-compilation-mode.patch similarity index 100% rename from src/v8/0005-Introduce-a-QML-compilation-mode.patch rename to src/declarative/v8/0005-Introduce-a-QML-compilation-mode.patch diff --git a/src/v8/0006-Allow-access-to-the-calling-script-data.patch b/src/declarative/v8/0006-Allow-access-to-the-calling-script-data.patch similarity index 100% rename from src/v8/0006-Allow-access-to-the-calling-script-data.patch rename to src/declarative/v8/0006-Allow-access-to-the-calling-script-data.patch diff --git a/src/v8/0007-Fix-warnings.patch b/src/declarative/v8/0007-Fix-warnings.patch similarity index 100% rename from src/v8/0007-Fix-warnings.patch rename to src/declarative/v8/0007-Fix-warnings.patch diff --git a/src/v8/0008-Add-custom-object-compare-callback.patch b/src/declarative/v8/0008-Add-custom-object-compare-callback.patch similarity index 100% rename from src/v8/0008-Add-custom-object-compare-callback.patch rename to src/declarative/v8/0008-Add-custom-object-compare-callback.patch diff --git a/src/v8/README b/src/declarative/v8/README similarity index 100% rename from src/v8/README rename to src/declarative/v8/README diff --git a/src/v8/v8.pro b/src/declarative/v8/v8.pri similarity index 97% rename from src/v8/v8.pro rename to src/declarative/v8/v8.pri index bc1837a..c526fcc 100644 --- a/src/v8/v8.pro +++ b/src/declarative/v8/v8.pri @@ -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 diff --git a/src/v8/v8base.pri b/src/declarative/v8/v8base.pri similarity index 93% rename from src/v8/v8base.pri rename to src/declarative/v8/v8base.pri index f57663e..209e4d5 100644 --- a/src/v8/v8base.pri +++ b/src/declarative/v8/v8base.pri @@ -1,6 +1,6 @@ V8DIR = $$(V8DIR) isEmpty(V8DIR) { - V8DIR = $$PWD/../3rdparty/v8 + V8DIR = $$PWD/../../3rdparty/v8 } else { message(using external V8 from $$V8DIR) } diff --git a/src/v8/wrapcc.pl b/src/declarative/v8/wrapcc.pl similarity index 100% rename from src/v8/wrapcc.pl rename to src/declarative/v8/wrapcc.pl diff --git a/src/src.pro b/src/src.pro index 1fa93c5..a8a33a7 100644 --- a/src/src.pro +++ b/src/src.pro @@ -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 diff --git a/tests/auto/declarative/v8/Makefile.nonqt b/tests/auto/declarative/v8/Makefile.nonqt index 20be72e..7ab695b 100644 --- a/tests/auto/declarative/v8/Makefile.nonqt +++ b/tests/auto/declarative/v8/Makefile.nonqt @@ -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 diff --git a/tests/auto/declarative/v8/v8.pro b/tests/auto/declarative/v8/v8.pro index 1030d17..bd6dfa9 100644 --- a/tests/auto/declarative/v8/v8.pro +++ b/tests/auto/declarative/v8/v8.pro @@ -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 -- 2.7.4