Harmonising certain command line switches between GDC and LDC
songthe
songthe at gmail.com
Tue Nov 12 04:49:02 UTC 2024
On Saturday, 27 May 2023 at 01:11:59 UTC, Cecil Ward wrote:
> Would it be possible for the maintainers of GDC and LDC to both
> support certain switches in use by the other compiler in order
> to reduce the frustration of this one grumpy user?
>
> I keep switching back and forth between -frelease and -release,
> and -march and -mcpu (is that even correct)?
>
> I’m not sure what I should be doing to get LDC correctly
> matched with -mtune and -march.
>
> I have of course ended up having to write batch files to
> abstract these annoyances away. When I’m examining generated
> code for my own correctness in godbolt.org Matt Godbolt’s
> Compiler Explorer, that’s when it drives me bonkers having to
> correct the switches when I switch between compilers.
>
> It’s just a small thing, I know, but it would be nice to
> harmonise, and not too much work.
It’s definitely frustrating having to keep track of different
switches for compilers. One thing I’ve found useful is to create
a script that detects which compiler is being used and
automatically applies the correct flags.
https://escaperoad.org
More information about the digitalmars-d-ldc
mailing list