From 1d5c00fde1d2263dd74f2bdc8590783057ec853e Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Thu, 19 Mar 2020 20:47:58 +0100 Subject: Detect newer msvc 2017 and 2019 cross compiler for full debug info Latest build tools installed with prefixes like: VC\Tools\MSVC\14.16.27023\bin\HostX64\x86\cl.exe VC\Tools\MSVC\14.24.28314\bin\Hostx86\x64\cl.exe where last part (x86 or x64) corresponds to target architecture and its parent directory (HostX86 or HostX64) to actual version of the compiler binary. Detect 64bit binary compiling for 32bit to allow activation of full set of debug symbols with force_debug_info. Change-Id: I1044203764ee0bec9dbc983448dcbf595217498d Reviewed-by: Allan Sandfeld Jensen --- src/buildtools/config/windows.pri | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/buildtools/config/windows.pri') diff --git a/src/buildtools/config/windows.pri b/src/buildtools/config/windows.pri index 2e5ebb876..a910e3e31 100644 --- a/src/buildtools/config/windows.pri +++ b/src/buildtools/config/windows.pri @@ -56,12 +56,17 @@ defineTest(usingMSVC32BitCrossCompiler) { } CL_DIR = $$system_path($$CL_DIR) CL_DIR = $$split(CL_DIR, \\) - CL_PLATFORM = $$last(CL_DIR) + CL_PLATFORM = $$take_last(CL_DIR) equals(CL_PLATFORM, amd64_x86): return(true) + equals(CL_PLATFORM, x86)|equals(CL_PLATFORM, x64) { + CL_PLATFORM = $$take_last(CL_DIR) + equals(CL_PLATFORM, HostX64): return(true) + } return(false) } msvc:contains(QT_ARCH, "i386"):!usingMSVC32BitCrossCompiler() { + warning(Full debug info is disabled for chromium due to 32bit compiler) # The 32 bit MSVC linker runs out of memory if we do not remove all debug information. force_debug_info: gn_args -= symbol_level=1 gn_args *= symbol_level=0 -- cgit v1.2.3