Skip to content

Conversation

@Scottj1s
Copy link
Member

fixes #1302

With VS 2022, PreferredToolArchitecture is now set appropriately for every architecture (via Microsoft.Cpp.ToolsetLocation.props), so should no longer be set unconditionally by C++/WinRT

</PropertyGroup>

<PropertyGroup>
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be scoped to the VS2022 build tools (so that VS2019 still gets it set)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Or the opposite; only set it for VS2019 and then VS2022+ do not set it because VS does the right thing already.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think the latest version of cppwinrt supports the 2019 compiler any longer.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, nevermind then.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's actually a bug to set it in VS2019 when building for ARM64 (reported elsewhere). And since it's just a build optimization, I think better to remove it altogether, than to effectively copy the intelligence in the VS 2022 Microsoft.Cpp.ToolsetLocation.props.

@Scottj1s Scottj1s merged commit 4587264 into master May 15, 2023
@Scottj1s Scottj1s deleted the scottj1s/remove_PreferredToolArchitecture branch May 15, 2023 18:19
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.

Bug: PreferredToolArchitecture x64 should default, not override, conditionally for x86

4 participants