From: Kent Hansen Date: Thu, 24 Nov 2011 07:01:08 +0000 (+0100) Subject: Make v8 snapshots work in debug-and-release mode X-Git-Tag: qt-v5.0.0-alpha1~2548 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=502b5b81784bd683b0571b1d72e76b3d786b98e1;p=profile%2Fivi%2Fqtbase.git Make v8 snapshots work in debug-and-release mode Debug snapshots and release snapshots aren't compatible. Both a debug version and release version of the mkv8snapshot tool must be built, and the corresponding executable selected when building v8. Adopt the library naming convention for naming the mkv8snapshot executable ("mkv8snapshot" in release, "mkv8snapshot_debug" in debug on Mac, "mkv8snapshotd" in debug on Windows). Change-Id: I7a94b09e7db7ed8bbaa293637c092a1d1d1dbaba Reviewed-by: Oswald Buddenhagen --- diff --git a/mkspecs/features/qt_functions.prf b/mkspecs/features/qt_functions.prf index 9ea188f..04737f5 100644 --- a/mkspecs/features/qt_functions.prf +++ b/mkspecs/features/qt_functions.prf @@ -1,3 +1,13 @@ +defineReplace(qtPlatformTargetSuffix) { + CONFIG(debug, debug|release) { + !debug_and_release|build_pass { + mac:return(_debug) + win32:return(d) + } + } + return() +} + defineReplace(qtLibraryTarget) { unset(LIBRARY_NAME) LIBRARY_NAME = $$1 @@ -5,14 +15,10 @@ defineReplace(qtLibraryTarget) { QMAKE_FRAMEWORK_BUNDLE_NAME = $$LIBRARY_NAME export(QMAKE_FRAMEWORK_BUNDLE_NAME) } - contains(TEMPLATE, .*lib):CONFIG(debug, debug|release) { - !debug_and_release|build_pass { - mac:RET = $$member(LIBRARY_NAME, 0)_debug - else:win32:RET = $$member(LIBRARY_NAME, 0)d - } - } - isEmpty(RET):RET = $$LIBRARY_NAME - return($$RET) + unset(LIBRARY_SUFFIX) + contains(TEMPLATE, .*lib):LIBRARY_SUFFIX = $$qtPlatformTargetSuffix() + isEmpty(LIBRARY_SUFFIX):return($$LIBRARY_NAME) + else:return($$member(LIBRARY_NAME, 0)$$LIBRARY_SUFFIX) } defineTest(qtAddLibrary) { diff --git a/src/tools/mkv8snapshot/mkv8snapshot.pro b/src/tools/mkv8snapshot/mkv8snapshot.pro index 8e80ce2..8070b54 100644 --- a/src/tools/mkv8snapshot/mkv8snapshot.pro +++ b/src/tools/mkv8snapshot/mkv8snapshot.pro @@ -11,6 +11,11 @@ DEPENDPATH += . LIBS = OBJECTS_DIR = . +contains(QT_CONFIG, build_all): CONFIG += build_all +win32|mac:!macx-xcode: CONFIG += debug_and_release + +TARGET = $$TARGET$$qtPlatformTargetSuffix() + cross_compile { equals(QT_ARCH, arm): V8_TARGET_ARCH = arm } diff --git a/src/v8/v8.pro b/src/v8/v8.pro index 1bc542e..6f8ed70 100644 --- a/src/v8/v8.pro +++ b/src/v8/v8.pro @@ -27,7 +27,7 @@ HEADERS += $$QT_SOURCE_TREE/src/v8/qtv8version.h include(v8.pri) contains(QT_CONFIG, v8snapshot) { - mkv8snapshot.commands = ../../bin/mkv8snapshot ${QMAKE_FILE_OUT} + mkv8snapshot.commands = ../../bin/mkv8snapshot$$qtPlatformTargetSuffix() ${QMAKE_FILE_OUT} DUMMY_FILE = v8.pro mkv8snapshot.input = DUMMY_FILE mkv8snapshot.output = $$V8_GENERATED_SOURCES_DIR/snapshot.cpp