Skip to content
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

Merged
merged 9 commits into from Oct 25, 2016
Merged

VCC wrappers with vcvars args. #4949

merged 9 commits into from Oct 25, 2016

Conversation

fredrikhr
Copy link
Contributor

VCC wrappers no longer wrap for compile-time specific target, instead they now peek into the command line args and evaluate vcvars prefixed arguments

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:
Copy link
Contributor Author

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"
Copy link
Contributor Author

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):
Copy link
Member

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
Copy link
Member

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.

@Araq Araq merged commit a612e1b into nim-lang:devel Oct 25, 2016
@fredrikhr fredrikhr deleted the nim-vccwrap branch March 14, 2017 19:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants