fix(msvs): don't preprocess marmasm sources on vs2022+ #162
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiling on VS2022+, compilation fails with a C1083 as MARMASM tries to preprocess by default. There doesn't seem to be a need for this preprocessing to take place.
Ref: https://developercommunity.visualstudio.com/t/ARM64---fatal-error-C1083:-Cannot-open/10119540
Ref: https://github.com/microsoft/cppwinrt/blob/36567e6e647c31caa3d3e5fe6a3219ceb6a78f3f/fast_fwd/fast_fwd.vcxproj#L125-L129
Question for the NodeJS team
Does
embedded.S
need to be preprocessed at all? VS support mentioned that we can either turn it off altogether or change thePreprocessedFileName
to something different. In my basic testing, the former seems to work just fine (no preprocessing).Testing
The bug can be consistently be reproduced on VS2022 17.4 preview on Windows ARM64 devices (see linked VS Developer Community thread). Reproducing can be done as follows:
After applying this patch to
tools/gyp/pylib/gyp/generator/msvs.py
, compilation works without issues: