Thread overview
Pass flags to the C compiler
Apr 07, 2018
Jacob Carlborg
Apr 07, 2018
David Nadlinger
Apr 07, 2018
Jacob Carlborg
Apr 07, 2018
Joakim
April 07, 2018
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
April 07, 2018
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


April 07, 2018
On Saturday, 7 April 2018 at 10:19:37 UTC, David Nadlinger wrote:

> -Xcc?

Thanks.

--
/Jacob Carlborg
April 07, 2018
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