Oprion for disable debug symbols or(and) strip debug symbols in release mode.
--HG-- branch : develop
This commit is contained in:
parent
3c6441bd85
commit
0fe066925a
|
@ -129,6 +129,9 @@ CONFIG(debug, debug|release){
|
||||||
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Turn on debug symbols in release mode on Unix systems.
|
# Turn on debug symbols in release mode on Unix systems.
|
||||||
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
||||||
!macx:!win32-msvc*{
|
!macx:!win32-msvc*{
|
||||||
|
@ -136,6 +139,7 @@ CONFIG(debug, debug|release){
|
||||||
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
||||||
QMAKE_LFLAGS_RELEASE =
|
QMAKE_LFLAGS_RELEASE =
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
macx{
|
macx{
|
||||||
HG = /usr/local/bin/hg # Can't defeat PATH variable on Mac OS.
|
HG = /usr/local/bin/hg # Can't defeat PATH variable on Mac OS.
|
||||||
|
@ -595,6 +599,12 @@ DEPENDPATH += $$PWD/../libs/vgeometry
|
||||||
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/vgeometry.lib
|
win32:!win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/vgeometry.lib
|
||||||
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/libvgeometry.a
|
else:unix|win32-g++: PRE_TARGETDEPS += $$OUT_PWD/../libs/vgeometry/$${DESTDIR}/libvgeometry.a
|
||||||
|
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Strip after you link all libaries.
|
# Strip after you link all libaries.
|
||||||
CONFIG(release, debug|release){
|
CONFIG(release, debug|release){
|
||||||
win32:!win32-msvc*{
|
win32:!win32-msvc*{
|
||||||
|
@ -611,7 +621,8 @@ CONFIG(release, debug|release){
|
||||||
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
macx{
|
macx{
|
||||||
|
|
|
@ -104,16 +104,28 @@ CONFIG(debug, debug|release){
|
||||||
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # Need for exchndl.dll
|
||||||
}
|
}
|
||||||
|
|
||||||
|
noStripDebugSymbols {
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
!macx:!win32-msvc*{
|
!macx:!win32-msvc*{
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Turn on debug symbols in release mode on Unix systems.
|
# Turn on debug symbols in release mode on Unix systems.
|
||||||
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
||||||
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
||||||
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
||||||
QMAKE_LFLAGS_RELEASE =
|
QMAKE_LFLAGS_RELEASE =
|
||||||
|
|
||||||
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Strip debug symbols.
|
# Strip debug symbols.
|
||||||
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
|
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
|
||||||
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
|
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
|
||||||
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -114,15 +114,23 @@ CONFIG(debug, debug|release){
|
||||||
}
|
}
|
||||||
|
|
||||||
!macx:!win32-msvc*{
|
!macx:!win32-msvc*{
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Turn on debug symbols in release mode on Unix systems.
|
# Turn on debug symbols in release mode on Unix systems.
|
||||||
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
|
||||||
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
||||||
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
|
||||||
QMAKE_LFLAGS_RELEASE =
|
QMAKE_LFLAGS_RELEASE =
|
||||||
|
|
||||||
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Strip debug symbols.
|
# Strip debug symbols.
|
||||||
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
|
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
|
||||||
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
|
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
|
||||||
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -83,10 +83,14 @@ CONFIG(debug, debug|release){
|
||||||
# Release mode
|
# Release mode
|
||||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Turn on debug symbols in release mode on Unix systems.
|
# Turn on debug symbols in release mode on Unix systems.
|
||||||
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
# On Mac OS X temporarily disabled. Need find way how to strip binary file.
|
||||||
unix:!macx:QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
unix:!macx:QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
||||||
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser2
|
||||||
|
@ -95,6 +99,12 @@ else:unix: LIBS += -L$$OUT_PWD/../../libs/qmuparser/bin/ -lqmuparser
|
||||||
INCLUDEPATH += $$PWD/../../libs/qmuparser
|
INCLUDEPATH += $$PWD/../../libs/qmuparser
|
||||||
DEPENDPATH += $$PWD/../../libs/qmuparser
|
DEPENDPATH += $$PWD/../../libs/qmuparser
|
||||||
|
|
||||||
|
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
|
noStripDebugSymbols { # For enable run qmake with CONFIG+=noStripDebugSymbols
|
||||||
|
# do nothing
|
||||||
|
} else {
|
||||||
# Strip after you link all libaries.
|
# Strip after you link all libaries.
|
||||||
CONFIG(release, debug|release){
|
CONFIG(release, debug|release){
|
||||||
unix:!macx{
|
unix:!macx{
|
||||||
|
@ -104,3 +114,5 @@ CONFIG(release, debug|release){
|
||||||
QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
|
QMAKE_POST_LINK += objcopy --add-gnu-debuglink $(TARGET).debug $(TARGET)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user