dmd
dmd copied to clipboard
Deprecate `-m32mscoff`
It is synonymous with -m32 on Windows and cannot be used for other platforms.
Thanks for your pull request and interest in making D better, @thewilsonator! 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:andReturns:)
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#13563"
@MoonlightSentinel seems like all tests with a // LINK: directive seem to be still looking for phobos32mscoff.lib, I'm not sure where in tools/d_do_test.d this is coming from. Any ideas?
LINK: just changes whether d_do_test passes -c to dmd when compiling the test
The issue here is the switch from MODEL=32mscoff to MODEL=32 - which causes the makefiles to name Druntime / Phobos as druntime32.lib / phobos32.lib instead of druntime32mscoff.lib / phobos32mscoff.lib
which causes the makefiles to name Druntime / Phobos as druntime32.lib / phobos32.lib
which is the intended outcome.
An example failing command
\path\to\dmd.exe -conf= -m32 -Ifail_compilation -verrors=0 -Icompilable -odD:\a\1\s\test\test_results\fail_compilation -ofD:\a\1\s\test\test_results\fail_compilation\needspkgmod_0.exe -i=, fail_compilation\needspkgmod.d
envData.model is clearly 32 here which is what it should be. So the only place I can imagine 32mscoff is coming from is the conf, but we explicitly pass -conf= so I don't understand where it is coming from.
which is the intended outcome.
Okay. run.d currently set the LIB environment variable here:
https://github.com/dlang/dmd/blob/843ae86dc97e3e05f87d03687d1cd3d85d02cc4d/test/run.d#L535
Note that you'll need to change the MODEL in the druntime / phobos workflows as well.
Relevant configuration files that are currently unchanged:
https://github.com/dlang/dmd/blob/4c3701de013f1cb3c3eb31c4207933c26fca9f9c/src/build.d#L308-L317
and
https://github.com/dlang/dmd/blob/master/ini/windows/bin/sc.ini