WinRT: Link against correct c-runtime
We need to move adding ucrt(d).lib out of the various qmake.conf as qmake.conf is only parsed once by qmake and does not differentiate between debug and release. Hence use default_pre.prf which is the earliest prf to use. This one also is being parsed multiple times and does what it is supposed to do. This allows API certification tests for Win10 to suceed, another sideeffect is that it is much cleaner at a single location now. Change-Id: Id899f4bbd063a3191c8f139857abf90efa827ffc Reviewed-by: Andrew Knight <andrew.knight@intopalo.com>
This commit is contained in:
parent
7c8e95612e
commit
c8d3f939b4
12
mkspecs/features/winrt/default_pre.prf
Normal file
12
mkspecs/features/winrt/default_pre.prf
Normal file
@ -0,0 +1,12 @@
|
||||
*msvc2015 {
|
||||
# Note that the order is important, ucrt(d) has to be first
|
||||
# Otherwise the linker might use malloc from a different library
|
||||
# but free_dbg() from the runtime, causing assert when deleting
|
||||
# items from different heaps
|
||||
CONFIG(debug, debug|release): \
|
||||
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
|
||||
else: \
|
||||
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
|
||||
}
|
||||
|
||||
load(default_pre)
|
@ -14,16 +14,6 @@ QMAKE_LFLAGS += /MACHINE:ARM
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib kernel32.lib
|
||||
|
||||
# Note that the order is important, ucrt(d) has to be first
|
||||
# Otherwise the linker might use malloc from a different library
|
||||
# but free_dbg() from the runtime, causing assert when deleting
|
||||
# items from different heaps
|
||||
CONFIG(debug, debug|release) {
|
||||
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
|
||||
} else {
|
||||
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
|
||||
}
|
||||
|
||||
VCPROJ_ARCH = ARM
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
|
@ -14,16 +14,6 @@ QMAKE_LFLAGS += /MACHINE:X64
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib kernel32.lib
|
||||
|
||||
# Note that the order is important, ucrt(d) has to be first
|
||||
# Otherwise the linker might use malloc from a different library
|
||||
# but free_dbg() from the runtime, causing assert when deleting
|
||||
# items from different heaps
|
||||
CONFIG(debug, debug|release) {
|
||||
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
|
||||
} else {
|
||||
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
|
||||
}
|
||||
|
||||
VCPROJ_ARCH = x64
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
|
@ -14,16 +14,6 @@ QMAKE_LFLAGS += /SAFESEH /MACHINE:X86
|
||||
|
||||
QMAKE_LIBS += windowscodecs.lib WindowsApp.lib runtimeobject.lib kernel32.lib
|
||||
|
||||
# Note that the order is important, ucrt(d) has to be first
|
||||
# Otherwise the linker might use malloc from a different library
|
||||
# but free_dbg() from the runtime, causing assert when deleting
|
||||
# items from different heaps
|
||||
CONFIG(debug, debug|release) {
|
||||
QMAKE_LIBS = ucrtd.lib $$QMAKE_LIBS
|
||||
} else {
|
||||
QMAKE_LIBS = ucrt.lib $$QMAKE_LIBS
|
||||
}
|
||||
|
||||
VCPROJ_ARCH = Win32
|
||||
MSVC_VER = 14.0
|
||||
WINSDK_VER = 10.0
|
||||
|
Loading…
Reference in New Issue
Block a user