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

fix issue 18352 - [REG 2.078] dmd can't generate 64-bit binaries on Windows #7827

Merged
merged 1 commit into from
Feb 2, 2018

Conversation

rainers
Copy link
Member

@rainers rainers commented Feb 1, 2018

… 10 with VS 2015

checking the KitsRoot10 lib folder is not good enough to detect the SDK, it might just contain the UCRT. Mimick vcvarsall.bat and verify that windows.h exists aswell.

…indows 10 with VS 2015

checking the KitsRoot10 lib folder is not good enough to detect the SDK, it might just contain the UCRT
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @rainers!

Bugzilla references

Auto-close Bugzilla Description
18352 [REG 2.078] dmd can't generate 64-bit binaries on Windows 10 with VS 2015

@@ -1046,7 +1046,7 @@ version (Windows)
if (WindowsSdkDir is null)
{
WindowsSdkDir = GetRegistryString(r"Microsoft\Windows Kits\Installed Roots", "KitsRoot10");
if (WindowsSdkDir && !FileName.exists(FileName.combine(WindowsSdkDir, "Lib")))
if (WindowsSdkDir && !findLatestSDKDir(FileName.combine(WindowsSdkDir, "Include"), r"um\windows.h"))
Copy link
Member

Choose a reason for hiding this comment

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

All the hipsters use backticks nowadays ;-)

(FWIW the two alternative ways of doing WYSIWYG strings seem to be yet another historical baggage of D)

Copy link
Member

Choose a reason for hiding this comment

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

Also the same logic is used here too:

dmd/src/dmd/link.d

Lines 1080 to 1084 in 3835543

if (WindowsSdkVersion is null && WindowsSdkDir !is null)
{
const(char)* rootsDir = FileName.combine(WindowsSdkDir, "Include");
WindowsSdkVersion = findLatestSDKDir(rootsDir, r"um\windows.h");
}

Might make sense to avoid duplications as this code seems to be highly susceptible to failures.

Copy link
Member Author

Choose a reason for hiding this comment

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

WindowsSdkVersion is no longer used after #7828, so this copy can be removed later.

@wilzbach wilzbach merged commit fa69a17 into dlang:stable Feb 2, 2018
@wilzbach
Copy link
Member

wilzbach commented Feb 2, 2018

Any way we can ensure on AppVeyor on auto-tester that this doesn't regress in the future?

@rainers
Copy link
Member Author

rainers commented Feb 2, 2018

Any way we can ensure on AppVeyor on auto-tester that this doesn't regress in the future?

Only by uninstalling all Windows 10 SDKs from the Appveyor image, so not really realistic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants