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

vcvars regression #3918

Merged
merged 2 commits into from Nov 8, 2018
Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Nov 6, 2018

Changelog: Fix: Fix regression introduced in 1.7, setting amd64_x86 when no arch_build is defined.

To pass CI, maybe a specific test that covers it is needed.

@ghost ghost assigned memsharded Nov 6, 2018
@ghost ghost added the stage: review label Nov 6, 2018
# Keep the VS default, which is x86 toolset
# This will probably be changed in conan 2.0
if ((settings.get_safe("arch_build") or
os.getenv("PreferredToolArchitecture") == "x64")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PreferredToolArchitecture is not an env var normally, right? in that case, I would name it CONAN_PREFERRED_TOOL_ARCHITECTURE. And it has to be documented (and mentioned in the changelog)

Copy link
Member Author

@memsharded memsharded Nov 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that it is an env-var: https://developercommunity.visualstudio.com/comments/282434/view.html, but I fail to find more compelling evidence on how is it used.

From: https://msdn.microsoft.com/en-us/library/ee662426.aspx

The PreferredToolArchitecture property determines whether the 32-bit or 64-bit compiler and tools are used in the build. This property does not affect the output platform architecture or configuration. By default, MSBuild uses the x86 version of the compiler and tools if this property is not set, or is set to any value other than x64.

Set the PreferredToolArchitecture property to x64 to use the 64-bit compiler and tools to build your application.

msbuild myProject.vcxproj /p:PreferredToolArchitecture=x64

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok then. I can't find it either, just people saying it works but no-official docs. Anyway this is ok.

@lasote lasote added this to the 1.9.1 milestone Nov 8, 2018
@lasote lasote merged commit 46ef0c5 into conan-io:release/1.9.1 Nov 8, 2018
@ghost ghost removed the stage: review label Nov 8, 2018
@memsharded memsharded deleted the hotfix/vcvars_regression branch November 9, 2018 15:40
grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018
* vcvars regression

* using env var PreferredToolArchitecture
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

4 participants