[WIP] [NeedsAcceptOrRejectFromWalter] Remove hardcoded phobos info from the compiler#9936
[WIP] [NeedsAcceptOrRejectFromWalter] Remove hardcoded phobos info from the compiler#9936marler8997 wants to merge 1 commit intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @marler8997! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
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 referencesYour 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 locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#9936" |
e8822b9 to
3ec4740
Compare
3ec4740 to
8e072cf
Compare
8e072cf to
8dbd7b3
Compare
|
Since the default library names can be overridden from the command line, why is this necessary? |
I wouldn't say it's necessary. What it does is provide separation between the compiler and the standard library. Today you can override/disable the default library, but because there's no clear separation, we've mistakenly introduced default library "isms" into EVERY compilation. On Windows DMD hardcodes user32 and kernel32 as a dependency to every program, even when defaultlib and conf are disabled: https://github.com/dlang/dmd/blob/master/src/dmd/link.d#L295 And on posix DMD does the same thing, it always adds https://github.com/dlang/dmd/blob/master/src/dmd/link.d#L672 These 2 issuecan be fixed (see #9831), but this PR helps keep them fixed. The compiler doesn't need to hard-code any information about the standard library, by removing it, it helps issues like this from happening again. But if you don't see any value with that, I'm fine with closing and just fixing the immediate issues. Fixing those issues is all I "need", this is more of an optional addition that I think will help keep those issues from happening again. Let me know if you think this PR is justified or not. |
|
Cleaning up old PRs that aren't going anywhere. |
This PR is going to take some coordination between dmd/druntime/phobos and also the packaging tools. The basic idea is to move all the hard-coded information about the standard library into
dmd.conf. This puts the responsibility of configuring phobos on the components who install/package dmd rather than hard-coding that configuration into DMD.For now I've simply removed all the hard-coded information about phobos to see what breaks. In theory, this PR should be able to be pushed as-is once the other tools are enhanced to take on the role of configuring phobos away from the compiler.