Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.6
-
None
-
Windows + MSVC
Description
When the /J option is added to QMAKE_CXXFLAGS, it does not end up in the resultant MSVC project file.
It is in the list of recognized arguments in msvc_objectmodel.cpp, and it assigns it to a member variable (DefaultCharIsUnsigned) when it is found. This is supposed to be written out to an XML tag of the same name, but it doesn't seem to get written out. As it turns out, this is irrelevant, because that tag is no longer in use as of MSVC 14 (the current minimum for Qt 5.11). It has probably not been in use for some earlier versions as well, but I don't have a way to double-check that.
This can be verified by viewing the Microsoft.Build.Commontypes.xsd found in the Visual Studio folder [base folder]/Xml/Schemas/1033/MSBuild – search the file for "CL" to find a section titled "NATIVE CL/LINK TASKS". This contains a list of supported tags for the "ClCompile" element, and missing from that list is DefaultCharIsUnsigned – so adding a tag with that value will be ignored when the project file is read. This can be verified for VS2015 & VS2017.
Instead, the /J option should be added to the 'AddtionalOptions' tag, as is done with some other options.