www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - Pass flags to the C compiler

reply Jacob Carlborg <doob me.com> writes:
Is it possible to pass the `--target` flag to the C compiler used 
for linking? Or get LDC to forward the  `-mtarget` flag.

This can be used on macOS as an alternative to 
`MACOSX_DEPLOYMENT_TARGET` environment variable that doesn't 
together with Dub or the `-macosx_version_min` linker flag.

--
/Jacob Carlborg
Apr 07 2018
parent reply David Nadlinger <code klickverbot.at> writes:
On Saturday, 7 April 2018 at 10:14:59 UTC, Jacob Carlborg wrote:
 Is it possible to pass the `--target` flag to the C compiler 
 used for linking?
-Xcc? —David
Apr 07 2018
parent reply Jacob Carlborg <doob me.com> writes:
On Saturday, 7 April 2018 at 10:19:37 UTC, David Nadlinger wrote:

 -Xcc?
Thanks. -- /Jacob Carlborg
Apr 07 2018
parent Joakim <dlang joakim.fea.st> writes:
On Saturday, 7 April 2018 at 10:48:24 UTC, Jacob Carlborg wrote:
 On Saturday, 7 April 2018 at 10:19:37 UTC, David Nadlinger 
 wrote:

 -Xcc?
Thanks. -- /Jacob Carlborg
Yep, see example here: https://wiki.dlang.org/Build_D_for_Android#Cross-compilation_3
Apr 07 2018