-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
v3: make -cc msvc work again
#28922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
v3: make -cc msvc work again
#28922
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
c4dccf7
v3: make `-cc msvc` work again
medvednikov ecfc349
v3: explain a missing `cl`, and compile MSVC programs with /bigobj
medvednikov 5d9d371
v3: keep MSVC-targeted C buildable by MinGW, include dbghelp.h for MSVC
medvednikov f61d000
v3: keep the full runtime for MSVC builds, include <intrin.h>
medvednikov 1c040d1
v3: MSVC lowering: keep extern names, keep macro loop bodies intact
medvednikov 72def51
v3: compile third-party C objects in cl's default mode, as V1 did
medvednikov f881413
v3: keep the CRT's POSIX names declared under cl /std:c11
medvednikov baceb32
tests: expect the Windows atomics header guard to cover MSVC
medvednikov 7494bbb
v3: detect cl by name in per-object paths, lower MSVC C printed to st…
medvednikov e66bda1
v3: keep `@[aligned]` struct alignment under MSVC
medvednikov cbbfc3e
v3: suggest a Windows target for MSVC C generated off Windows
medvednikov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typeofbefore invoking MSVCWhen a program calls
.pointers()on a fixed array,gen_fixed_array_pointers_expremits a GNU-styletypeof(...)declaration (vlib/v/gen/c/array.v:975), but this compatibility pass leaves that token unchanged. The resulting source is then compiled with/std:c11; Microsoft documents Ctypeofas requiring/std:clatest, so these otherwise valid V programs fail under-cc msvc. Add an MSVC-specific declaration in cgen or teach this pass to replace the emittedtypeof.Useful? React with 👍 / 👎.