Resurrect #1735 / #2044 (-link-defaultlib-shared)#2443
Resurrect #1735 / #2044 (-link-defaultlib-shared)#2443kinke merged 1 commit intoldc-developers:masterfrom
Conversation
50c7a22 to
15f45a3
Compare
|
Some feedback about the switch name please, so that we can deliver it in v1.7. Note that the probably more important thing here is that shared default libs are used by default when generating a shared library (as long as they are available in the first place, e.g., not on Windows). The breaking change for distros remains - they'd either need to adopt the |
|
TL;DR: For the naming, I think I prefer the How about: How much do we want to break things, in order to improve things? I like "std" better than "default", because it fits better with common parlance. Also, it's unfortunate that the naming does not indicate that one should pass all libraries to a single |
|
Just read #2044 again. About "default" vs "std", I guess you have a point about "std" perhaps referring only to Phobos. So then "defaultlibs" (plural) would be the most clear? (but then not worth the breakage) |
|
Thx for the feedback.
Exactly my thoughts.
That one's hidden now, deprecated so to speak, but still there for backwards and DMD compatibility ((L)DMD also has Wrt. adding a
I don't have a strong opinion on this either, but I thought that getting rid of the current invalid-instruction issue would outweigh the breakage. Non-distro users would only experience the breakage if they compile themselves with Edit: Oh I forgot the breaking change for people currently resorting to |
|
Oh, so I misunderstood maybe. Let's remove the deprecated flags from the discussion. So then the recommended interface is this (which works for most use cases, the hidden options are there for more advanced stuff) ? About ordering in the help output: we can make categories/sections to help with that; combining all link related flags in one section. |
|
Yeah that'd be the proposed interface, expecting either
from the user in almost all cases. [And |
|
Agreed & ready to be merged? |
|
Let's add a verb in the boolean options, |
|
I don't really like the verb in the middle. I just experimented with a dedicated category, that'd look like this (with current master, i.e., old interface): I'd rather have it listed below the general options (but haven't figured out how), otherwise I'd find it pretty nice with |
|
Looks nice indeed with the category. The ordering is unfortunate, but I can live with it (it's not something super simple as sorting alphabetically, right?). |
... to -link-defaultlib-debug (with alias for backwards compatibility). -link-defaultlib-shared is to be used for switching between static and shared default libs to be linked with. It defaults to true when generating shared libraries (if shared druntime/Phobos are supported for the target, i.e., not for Windows). This is a benign breaking change!
15f45a3 to
58dfe7e
Compare
It is. ;) Looks like this now, below |
|
cool. lgtm. Offtopic: do you think it's worthwhile grouping the instrumentation options? |
|
Definitely worthwhile IMO, same as for the other groups you mentioned earlier. With |
|
I was thinking of a single group combining instrumentation/sanitizer/profiling options. Don't know what to call it, but they all involve instrumentation / investigation of code. (should PGO be in there?) |
|
Noted. In my defence, it wasn't necessarily a breaking change, as previously it mainly depended on how LDC was built ( |
|
I agree our use case is niche but I think makes sense for anyone that will want to distribute D "plugins" for any software. About point 1&2), redistributing rather small and self-contained shared libraries is pretty much standard in our line of work, and they must come in 2 archs for 2 OS, so it would be an enormous weight to bear to add the full shared libraries (I estimate 70mb). I work behind phone internet so small size are paramount! Moreover, phobos is only getting larger. I honestly don't think we have much of a choice with the "odd" things we do. About your point 3), I'm not sure what using multiple runtimes would create as a problem, we used to do that before disabling it. We'd like to enable it again thanks to the work LDC did, if it's only about avoiding TLS no problem. |

No description provided.