[SERVER-59306] Select the conformant C++ preprocessor on MSVC builds Created: 11/Aug/21  Updated: 27/Oct/23  Resolved: 27/Oct/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Billy Donahue Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Development Platform
Participants:

 Description   

We should add /Zc:preprocessor to CCFLAGS where it's available.

Otherwise we have legacy MSVC problems, like raw string literals are misinterpreted.

https://evergreen.mongodb.com/lobster/evergreen/task/mongodb_mongo_master_enterprise_windows_suggested_compile_unittests_patch_74f795cdebd943bf8d6a56005dde4e2189cfb76e_6113fc09d6d80a58ffc0491b_21_08_11_16_35_42/0/task#bookmarks=0%2C1816&l=1&shareLine=1629

More Info:
https://developercommunity.visualstudio.com/t/C2017-illegal-escape-sequence-when-usi/919371?space=62&q=raw+string+literal+escape+sequence+unrecognized



 Comments   
Comment by Alex Neben [ 14/Dec/22 ]

Looks like we still don't have a new enough windows to support this change. Putting this back into the backlog.

Comment by Andrew Morrow (Inactive) [ 13/Sep/21 ]

It appears that we can't do this until we have the Windows 10 SDK. I'm going to queue this up in the epic where we are doing MSVC upgrade work so we don't forget about it.

Comment by Andrew Morrow (Inactive) [ 13/Sep/21 ]

billy.donahue - If we are running MSVS 16.5 then I think we can do this, as that is the first VS 2019 version that supports that flag as non-experimental. Assuming we are up to that version, it should be easy to patch queue enablement of that flag. If it builds, great, we can enable it. If there are issues though, we will need to take a closer look to see if they are things we can reasonably fix.

Generated at Thu Feb 08 05:46:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.