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
VCC wrappers with vcvars args. #4949
Conversation
VCC wrappers no longer wrap for compile-time specific target VCC wrappers now peek into the command line args and evaluate vcvars prefixed arguments
vcc.exe = "vccexe.exe" | ||
vcc.linkerexe = "vccexe.exe" | ||
|
||
# Here we need to set the options for specific platforms: |
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.
@Araq I'm unsure if this is how we would do this?
vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" | ||
vcc.options.always = "/nologo" | ||
vcc.options.speed = "/O2 /arch:SSE2" |
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.
My CL.exe (Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1
) complains abount /arch:SSE2
Link.exe wrapper superfluous, because Nim uses cl.exe command-line arguments to defer to linker
vcc.options.debug = "/Zi /Fd\"$projectName.pdb\"" | ||
vcc.options.always = "/nologo" | ||
@if defined(i386): |
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.
The syntax is just @if i386
platformArgPrefix = "platform:" | ||
storeArgPrefix = "store" | ||
sdkArgPrefix = "sdk:" | ||
vcvarsArgIdx = 1 # vcvars comes after - or / char in argument |
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.
This is convoluted. The arguments should be like --foo:var
like Nim does. This way there is also no clash possible with cl's arguments.
Not necessary, since vccexe uses less advanced, but non-invasive argument parsing
previous options.linker.always is not supported in nim.cfg Removed /Fd\"$projectName.pdb\" (Implied by /Zi)
VCC wrappers no longer wrap for compile-time specific target, instead they now peek into the command line args and evaluate vcvars prefixed arguments