Skip to content

Comments

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

Merged
wilzbach merged 1 commit intodlang:stablefrom
rainers:issue18352
Feb 2, 2018
Merged

fix issue 18352 - [REG 2.078] dmd can't generate 64-bit binaries on Windows#7827
wilzbach merged 1 commit intodlang:stablefrom
rainers:issue18352

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
@rainers rainers requested a review from WalterBright as a code owner February 1, 2018 18:45
@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

{
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
Contributor

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
Contributor

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
Contributor

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants