Skip to content

Commit

Permalink
fix(msvs): don't preprocess marmasm sources on vs2022+
Browse files Browse the repository at this point in the history
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
  • Loading branch information
dennisameling committed Aug 21, 2022
1 parent 1f421c9 commit 9d1587f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pylib/gyp/generator/msvs.py
Original file line number Diff line number Diff line change
Expand Up @@ -3633,6 +3633,15 @@ def _AddSources2(
elif file_name.startswith("$("):
file_name = re.sub(r"^\$\([^)]+\)\\", "", file_name)
detail.append(["ObjectFileName", "$(IntDir)\\" + file_name])
if element == "MARMASM":
# When compiling on VS2022+, compilation fails with a C1083 as
# MARMASM tries to preprocess by default.
# https://developercommunity.visualstudio.com/t/ARM64---fatal-error-C1083:-Cannot-open/10119540
detail.append([
"PreprocessWithCl",
{"Condition": "'$(VisualStudioVersion)' >= '17.0'"},
"false"
])
grouped_sources[group].append([element, {"Include": source}] + detail)


Expand Down

0 comments on commit 9d1587f

Please sign in to comment.