]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commit
Work around bug in VS2017 SDV
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 19 Jul 2018 08:18:43 +0000 (09:18 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Thu, 19 Jul 2018 09:03:07 +0000 (10:03 +0100)
commit868cd40f1b51eb1ffd3cdb8e9fe132cf95895f99
tree975912107987c39536fdead9455a334f00c7304f
parent09d30019eea676b3d968900754569d9994ab26e3
Work around bug in VS2017 SDV

It appears that the new SDV cannot handle the quoted __MODULE__ definitions
on compailer command lines and will thus crash out with some obscure error.
Increasing the logging level shows output of the form:

slamcl {
.
.
.
cl : Command line warning D9024 : unrecognized source file type 'XENBUS" /D POOL_NX_OPTIN=1 /D NT_PROCESSOR_GROUPS /D _WIN64 /D _AMD64_ /D AMD64 /D _WIN32_WINNT=0x0A00 /D WINVER=0x0A00 /D WINNT=1 /D NTDDI_VERSION=0x0A000005 /GF /Gm- /Zp8 /GS /guard:cf /Gy /fp:precise /Zc:wchar_t- /Zc:forScope /Zc:inline /GR- /Fox64\Windows10Release\ /Fdx64\Windows10Release\vc141.pdb /Gz /wd4464 /wd4711 /wd4548 /wd4770 /wd4820 /wd4668 /wd4255 /wd5045 /wd6001 /wd6054 /wd28160 /wd30030 /wd30029 /wd4603 /wd4627 /wd4986 /wd4987 /wd4996 /FIC:\Program', object file assumed
cl : Command line warning D9027 : source file 'XENBUS" /D POOL_NX_OPTIN=1 /D NT_PROCESSOR_GROUPS /D _WIN64 /D _AMD64_ /D AMD64 /D _WIN32_WINNT=0x0A00 /D WINVER=0x0A00 /D WINNT=1 /D NTDDI_VERSION=0x0A000005 /GF /Gm- /Zp8 /GS /guard:cf /Gy /fp:precise /Zc:wchar_t- /Zc:forScope /Zc:inline /GR- /Fox64\Windows10Release\ /Fdx64\Windows10Release\vc141.pdb /Gz /wd4464 /wd4711 /wd4548 /wd4770 /wd4820 /wd4668 /wd4255 /wd5045 /wd6001 /wd6054 /wd28160 /wd30030 /wd30029 /wd4603 /wd4627 /wd4986 /wd4987 /wd4996 /FIC:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files', object file assumed
cl : Command line warning D9027 : source file 'Files' ignored
cl : Command line warning D9024 : unrecognized source file type '(x86)\Windows', object file assumed
cl : Command line warning D9027 : source file '(x86)\Windows' ignored
cl : Command line warning D9024 : unrecognized source file type 'Kits\10\Include\10.0.17134.0\shared\warning.h /analyze /analyze:quiet /analyze:stacksize1024 /analyze:pluginC:\Program', object file assumed
cl : Command line warning D9027 : source file 'Kits\10\Include\10.0.17134.0\shared\warning.h /analyze /analyze:quiet /analyze:stacksize1024 /analyze:pluginC:\Program' ignored
cl : Command line warning D9024 : unrecognized source file type 'Files', object file assumed
cl : Command line warning D9027 : source file 'Files' ignored
.
.

(Notice the mismatched ' and " quotes around XENBUS).

This patch pulls the definition of __MODULE__ into dbg_print.h (as well as
the coinstaller and monitor sources) as follows:

    #define stringify_literal(_text) #_text
    #define stringify(_text) stringify_literal(_text)
    #define __MODULE__ stringify(PROJECT)

PROJECT is then defined on the compiler command line as the simple,
unquoted, value of $(ProjectName) which is a Visual Studio intrinsic.
This seems to keep SDV happy while still providing a reasonable definition
of __MODULE__ for use in debug output.

NOTE: This patch also turns on SDV debugging by default to aid future
      diagnosis of issues.

Reported-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
14 files changed:
build.py
src/coinst/coinst.c
src/common/dbg_print.h
src/monitor/monitor.c
vs2015/xen/xen.vcxproj
vs2015/xenbus/xenbus.vcxproj
vs2015/xenbus_coinst/xenbus_coinst.vcxproj
vs2015/xenbus_monitor/xenbus_monitor.vcxproj
vs2015/xenfilt/xenfilt.vcxproj
vs2017/xen/xen.vcxproj
vs2017/xenbus/xenbus.vcxproj
vs2017/xenbus_coinst/xenbus_coinst.vcxproj
vs2017/xenbus_monitor/xenbus_monitor.vcxproj
vs2017/xenfilt/xenfilt.vcxproj