Bug 18999 – MSCRT selection specifies _ITERATOR_DEBUG_LEVEL and produces a `version`

Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2018-06-17T00:12:07Z
Last change time
2018-09-16T20:04:05Z
Assigned to
No Owner
Creator
Manu

Comments

Comment #0 by turkeyman — 2018-06-17T00:12:07Z
For Win32/Win64, `_ITERATOR_DEBUG_LEVEL` needs to be embedded in the binary with the value 0 or 2 matching the version of mscrt that was selected. 0 for release runtime, 2 for debug runtime. If no crt is selected, then it should be omitted. This will allow D objects to link against C++ objects that were built for the respective runtime. We also need a version() for the mscrt selected at compile time, so that we can guide struct contents against the runtime selected (STL structs have different content based on _ITERATOR_DEBUG_LEVEL) A resolution to this problem might be if only a version were specified, and also a pragma that allowed embedding _ITERATOR_DEBUG_LEVEL only when a module imports a `core.stdcpp` module. That way only objects that interact with STL would entail the linkage problems associated with microsoft's runtime.
Comment #1 by turkeyman — 2018-09-16T20:04:05Z
This is being addressed by other issues.