Add targets for release binaries? (1.3+)

Adrian Matoga via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Fri May 5 09:27:10 PDT 2017


On Friday, 5 May 2017 at 15:52:44 UTC, kinke wrote:
> On Friday, 5 May 2017 at 12:49:32 UTC, David Nadlinger wrote:
>> LDC's part can easily be done by adding a small piece of code 
>> to the config file handling such that different sections are 
>> matched depending on the chosen target (where you can then set 
>> library lookup paths for druntime/Phobos, the GCC excecutable 
>> to use for cross linking, etc.).
>
> Rainer (IIRC) already implemented that a year ago or so.
> Just add additional sections, named exactly like the target 
> triple, to the config file, e.g.:
>
> `
> default:
> {
>     switches = [
>         "-I%%ldcbinarypath%%/../import/ldc",
>         "-I%%ldcbinarypath%%/../import",
>         "-L-L%%ldcbinarypath%%/../lib64",
>         "-defaultlib=phobos2-ldc,druntime-ldc",
>         "-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
>     ];
> };
> armv7-none-linux-android:
> {
>     switches = [
>         "-I%%ldcbinarypath%%/../import/ldc",
>         "-I%%ldcbinarypath%%/../import",
>         "-gcc=MY_CROSS_LINKING_GCC",
>         "-L-LMY_ARM_LIBS_DIR",
>         "-defaultlib=phobos2-ldc,druntime-ldc",
>         "-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
>     ];
> };
> `
>
> We could spice it up by allowing wildcards in the section names 
> at some point, but cross-compiling druntime/Phobos, installing 
> an appropriate cross-gcc and modifying the LDC config file is 
> really all what's needed.

Is this included in the releases? Or at least in master?
I'm trying it out with 1.2.0 and LDC doesn't seem to pick up 
anything but "default", whatever -mtriple I pass to it.



More information about the digitalmars-d-ldc mailing list