Bug 7678 – Add -cflags switch for DMD that allows passing flags to GCC or ${CC}

Status
RESOLVED
Resolution
DUPLICATE
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-03-09T23:25:00Z
Last change time
2017-06-09T11:10:51Z
Assigned to
nobody
Creator
chadjoan
Blocks
5278

Comments

Comment #0 by chadjoan — 2012-03-09T23:25:23Z
On Linux and a few other hosts, DMD uses gcc (or whatever is defined in the CC environment variable) to do its linking. Currently there seems to be no way to pass flags into this C compiler. This becomes a problem when you NEED to change the flags passed into that compiler. The -Llinkerflag, unfortunately, doesn't help here. An example of this is issue 5278 (http://d.puremagic.com/issues/show_bug.cgi?id=5278). Without this patch, I would need to go through a lot of hoops just to upgrade my compiler every time.
Comment #1 by chadjoan — 2012-03-09T23:34:47Z
Comment #2 by code — 2017-06-09T11:10:51Z
Let's go with LDC's -Xcc switch. *** This issue has been marked as a duplicate of issue 17390 ***