Refactoring. Remove unneeded conditions.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-12-22 11:48:42 +02:00
parent cadf6ecb3b
commit 888a968056
4 changed files with 58 additions and 23 deletions

View File

@ -692,17 +692,17 @@ CONFIG(release, debug|release){
} else {
!macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
win32:!*msvc*{
win32{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix:!macx{
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else {
win32:!*msvc*{
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
@ -711,7 +711,7 @@ CONFIG(release, debug|release){
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
unix:!macx{
unix{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&

View File

@ -98,8 +98,15 @@ CONFIG(release, debug|release){
} else {
!macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else {
# Turn on debug symbols in release mode on Unix systems.
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
@ -107,12 +114,23 @@ CONFIG(release, debug|release){
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
QMAKE_LFLAGS_RELEASE =
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
unix{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
QMAKE_DISTCLEAN += ${TARGET}.dbg
}
}
}
}

View File

@ -97,22 +97,39 @@ CONFIG(release, debug|release){
} else {
!macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else {
# Strip after you link all libaries.
# Turn on debug symbols in release mode on Unix systems.
# On Mac OS X temporarily disabled. TODO: find way how to strip binary file.
QMAKE_CXXFLAGS_RELEASE += -g -gdwarf-3
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
QMAKE_LFLAGS_RELEASE =
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="bin/${TARGET}.dbg" bin/${TARGET}
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
unix{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&
QMAKE_POST_LINK += objcopy --add-gnu-debuglink="${TARGET}.dbg" ${TARGET}
QMAKE_DISTCLEAN += ${TARGET}.dbg
}
}
}
}

View File

@ -100,17 +100,17 @@ CONFIG(release, debug|release){
} else {
!macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
win32:!*msvc*{
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix:!macx{
unix{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else {
win32:!*msvc*{
win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug bin/${TARGET} bin/${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} &&
@ -119,7 +119,7 @@ CONFIG(release, debug|release){
QMAKE_DISTCLEAN += bin/${TARGET}.dbg
}
unix:!macx{
unix{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&