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

Visual Studio Project for the runtime #20783 #20837

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

12345swordy
Copy link
Contributor

@12345swordy 12345swordy commented Feb 9, 2025

@rainers @thewilsonator
Ok I got the basics done, it builds the library solution successfully. Let me know if there anything else that the solution should do.
Fixes #20783

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @12345swordy! 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

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#20837"

@thewilsonator
Copy link
Contributor

I feel like this is liable to get out of sync as files are added and moved around.

@rainers
Copy link
Member

rainers commented Feb 9, 2025

dmd.vcxproj uses the deprecated, but still functional source globbing version:

  <ItemGroup>
    <DCompile Include="../dmd/**/*.d" Exclude="../dmd/frontend.d;../dmd/asttypename.d" />
  </ItemGroup>

That hasn't broken for years AFAICT. You must edit the project in a text editor, though, as saving it from within VS wrecks that.

I would not add a new directory just for the new project, add druntime.vcxproj along side dmd.vcxproj.

@rainers
Copy link
Member

rainers commented Feb 9, 2025

I suspect you will need some msbuild-magic to switch the compiler from the dmd-project to be used for building druntime. Any other compiler is not guaranteed to be in sync and might not be able to compile the current version of druntime.

@12345swordy
Copy link
Contributor Author

12345swordy commented Feb 9, 2025

@rainers I can't find the ability to override the default path of the dmd compiler anywhere in visual d here.

@rainers
Copy link
Member

rainers commented Feb 10, 2025

@rainers I can't find the ability to override the default path of the dmd compiler anywhere in visual d here.

I think you should be able to replace the path to dmd.exe with something like

    <PropertyGroup>
      <DMDBinDir>$(ProjectDir)\..\..\..\generated\Windows\$(Platform)\$(ConfigurationName)</DMDBinDir>
    </PropertyGroup>

somewhere after the eraly imports.

@12345swordy
Copy link
Contributor Author

@rainers Ok! Its officially done! It builds using the generated dmd executable per requested.

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.

Remove the DigitalMars make requirement when building with Visual Studio by expanding the solution
4 participants