Bug 19194 – version for `-mscrtlib` specification

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2018-08-27T01:39:51Z
Last change time
2018-09-19T06:00:53Z
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2018-08-27T01:39:51Z
The MSCRT libs have data structures appearing in the ABI which are defined differently for each build of the lib. Please create a builtin version which is defined for each selection of `-mscrtlib` so code can detect and match the data structures from the lib. *** Splitting https://issues.dlang.org/show_bug.cgi?id=18999 for simplicity
Comment #1 by iamthewilsonator — 2018-08-27T06:12:56Z
Is it enough to just pass `-debug=mscrtlib` along with `-mscrtlib=libcmtd/msvcrtd`? the do version(Windows) { debug(mscrtlib) enum = _ITERATOR_DEBUG_LEVEL = 2; else enum = _ITERATOR_DEBUG_LEVEL = 0; } this could be done automatically, of course but in the mean time the above should work.
Comment #2 by turkeyman — 2018-08-27T07:17:51Z
I have work-arounds in place. Work-arounds aren't confidence inspiring. Shit needs to just-work right ;) I figure settings a version for the selected crtlib offers the most information, and guarantees that we won't need any other distinction material at any later time.
Comment #3 by turkeyman — 2018-09-03T23:06:04Z
Comment #4 by turkeyman — 2018-09-16T03:19:56Z
Comment #5 by github-bugzilla — 2018-09-19T06:00:52Z
Commit pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/0563a79dc81366236cbda77eada43ea98761310d Fixes Issue 19194 - version for `-mscrtlib` specification Add __CXXLIB__ predefined enum.