digitalmars.D.bugs - [Issue 19195] New: Support pragma to specify linker directives
- d-bugmail puremagic.com (25/25) Aug 26 2018 https://issues.dlang.org/show_bug.cgi?id=19195
https://issues.dlang.org/show_bug.cgi?id=19195 Issue ID: 19195 Summary: Support pragma to specify linker directives Product: D Version: D2 Hardware: All OS: Windows Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: turkeyman gmail.com MSVC emits a bunch of "/FAILIFMISMATCH:" directives to object files. These express the state of various conditions during compilation, and guard against incorrect linking. Please add a pragma to emit these to object files in the same way as pragma(lib, ) does for the "/DEFAULTLIB:" directive. Perhaps a general `pragma(linkdirective, "text")` could be added to support raw directives as required, and future-proof against this class of problem. For example: pragma(linkdirective, "/FAILIFMISMATCH:_ITERATOR_DEBUG_LEVEL=2"); May appear in a source file under a version() where struct's are specified accordingly to match such configuration of the MSCRT. --
Aug 26 2018