installer icon indicating copy to clipboard operation
installer copied to clipboard

Fix Issue 21222 - Add windows 64 bit version of rdmd

Open RazvanN7 opened this issue 3 years ago • 6 comments

cc @CyberShadow

RazvanN7 avatar Jul 16 '21 08:07 RazvanN7

Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon. Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
21222 major Add windows 64 bit version of rdmd

dlang-bot avatar Jul 16 '21 08:07 dlang-bot

@rainers is the expert - any chance you could have a look?

CyberShadow avatar Jul 16 '21 09:07 CyberShadow

There are no executables in bin64 in the installer artifact other than dmd.exe, dub.exe and lld-link.exe. It might be useful for rdmd.exe to pick up the 64-bit compiler, but other tools like ddemangle.exe or dustmite.exe don't need much memory themselves.

To have the 32-bit tools available on 64-bit, too, dmd2vars64.bat adds both bin folders to PATH, see https://github.com/dlang/installer/blob/master/windows/d2-installer.nsi#L276. If done through a registry entry, the same should probably happen.

rainers avatar Jul 16 '21 15:07 rainers

@rainers I'm guessing something went wrong with [1] that is causing [2]. The only difference that I could spot with with regards to setting the PATH is in the registry entry setting (missing for the 64-bit directory).

How should we proceed?

[1] https://github.com/dlang/installer/blob/master/windows/d2-installer.nsi#L276 [2] https://forum.dlang.org/post/[email protected]

RazvanN7 avatar Jul 28 '21 16:07 RazvanN7

I'm not sure what the problem actually is: A 64-bit rdmd doesn't really do anything different than a 32-bit version. If also placed in the bin64 folder, it will use the 64-bit dmd.exe, but that will not do anything different than the 32-bit version of dmd (especially not build 64-bit executables). The only reason to use the 64-bit dmd is when you need a lot of memory to compile, but that is unlikely to be the case if you use script like programs with rdmd.

If you want to actually want rdmd in the bin64 folder, you need to update the release build program around here: https://github.com/dlang/installer/blob/master/create_dmd_release/create_dmd_release.d#L595

rainers avatar Jul 31 '21 14:07 rainers

As far as I understand, this user [1] could not use rdmd because because path wasn't set appropriately: "I added this to my path and it runs, but are there any implications for building 64 bit apps". I am interpreting this as: rdmd was not found when for the 64-bit installation. Looking at the nsi script, it seems that $PATH is indeed set to bin32 and bin64 both on 64-bit systems, but then how do we explain the scenario encountered by the above mentioned user?

[1] https://forum.dlang.org/post/[email protected]

RazvanN7 avatar Aug 01 '21 12:08 RazvanN7