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

View File

@ -98,8 +98,15 @@ CONFIG(release, debug|release){
} else { } else {
!macx:!*msvc*{ !macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# Strip after you link all libaries. win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
}
unix{
# Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} else { } 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.
@ -107,6 +114,7 @@ CONFIG(release, debug|release){
QMAKE_CFLAGS_RELEASE += -g -gdwarf-3 QMAKE_CFLAGS_RELEASE += -g -gdwarf-3
QMAKE_LFLAGS_RELEASE = QMAKE_LFLAGS_RELEASE =
win32{
# 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} &&
@ -114,6 +122,16 @@ CONFIG(release, debug|release){
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,16 +97,23 @@ CONFIG(release, debug|release){
} else { } else {
!macx:!*msvc*{ !macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
# Strip after you link all libaries. win32{
# Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
} else { }
unix{
# Strip after you link all libaries. # Strip after you link all libaries.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
}
} 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 =
win32{
# 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} &&
@ -114,6 +121,16 @@ CONFIG(release, debug|release){
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 { } else {
!macx:!*msvc*{ !macx:!*msvc*{
noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols noDebugSymbols{ # For enable run qmake with CONFIG+=noDebugSymbols
win32:!*msvc*{ win32{
# Strip debug symbols. # Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET} QMAKE_POST_LINK += objcopy --strip-debug bin/${TARGET}
} }
unix:!macx{ unix{
# Strip debug symbols. # Strip debug symbols.
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} QMAKE_POST_LINK += objcopy --strip-debug ${TARGET}
} }
} else { } else {
win32:!*msvc*{ win32{
# 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} &&
@ -119,7 +119,7 @@ CONFIG(release, debug|release){
QMAKE_DISTCLEAN += bin/${TARGET}.dbg QMAKE_DISTCLEAN += bin/${TARGET}.dbg
} }
unix:!macx{ unix{
# Strip debug symbols. # Strip debug symbols.
QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg && QMAKE_POST_LINK += objcopy --only-keep-debug ${TARGET} ${TARGET}.dbg &&
QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} && QMAKE_POST_LINK += objcopy --strip-debug ${TARGET} &&