Jump to page: 1 2
Thread overview
January 05

Hi, I am trying with gdc to create the equivalent of a fat jar. So for that I would need the standard dlang library included in the object or library file. Does somebody know the needed gdc flags?
I am using mips64-linux-gnuabi64-gdc-12.
pizza_dox_9999

January 07

On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:

>

Hi, I am trying with gdc to create the equivalent of a fat jar. So for that I would need the standard dlang library included in the object or library file. Does somebody know the needed gdc flags?
I am using mips64-linux-gnuabi64-gdc-12.
pizza_dox_9999

Did you try using dub and specifying targetType="staticLibrary"?

See https://dub.pm/dub-reference/build_settings/#targetpath

Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with dub build -v.

January 14

On Sunday, 7 January 2024 at 18:14:12 UTC, Renato wrote:

>

On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:

>

Hi, I am trying with gdc to create the equivalent of a fat jar. So for that I would need the standard dlang library included in the object or library file. Does somebody know the needed gdc flags?
I am using mips64-linux-gnuabi64-gdc-12.
pizza_dox_9999

Did you try using dub and specifying targetType="staticLibrary"?

See https://dub.pm/dub-reference/build_settings/#targetpath

Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with dub build -v.

Thank you for the information. Sadly nothing for gdc directly. But how is dub solving my problem? Is the buildstep creating a "fat jar". So instead of compiling multiple .d files with gdc I would only compile the "fat jar" from dub?

January 14

On Sunday, 14 January 2024 at 09:36:16 UTC, pizza_dox_9999 wrote:

>

On Sunday, 7 January 2024 at 18:14:12 UTC, Renato wrote:

>

On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:

>

Hi, I am trying with gdc to create the equivalent of a fat jar. So for that I would need the standard dlang library included in the object or library file. Does somebody know the needed gdc flags?
I am using mips64-linux-gnuabi64-gdc-12.
pizza_dox_9999

Did you try using dub and specifying targetType="staticLibrary"?

See https://dub.pm/dub-reference/build_settings/#targetpath

Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with dub build -v.

Thank you for the information. Sadly nothing for gdc directly. But how is dub solving my problem? Is the buildstep creating a "fat jar". So instead of compiling multiple .d files with gdc I would only compile the "fat jar" from dub?

I think you misunderstood me. dub is the D's build system and it "knows" how to call the D compilers, including gdc.

When you tell dub to build a static library (equivalent to "fat jar" for D) it will use whatever compiler options are needed to do so... you can run dub build -v -release --compiler=gdc to see which compiler options it's using to invoke gdc, and then you can just drop dub if you don't need it (though it's very useful to have).

January 14
On 08/01/2024 7:14 AM, Renato wrote:
> On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:
>> Hi, I am trying with gdc to create the equivalent of a fat jar. So for that I would need the standard dlang library included in the object or library file. Does somebody know the needed gdc flags?
>> I am using mips64-linux-gnuabi64-gdc-12.
>> pizza_dox_9999
> 
> Did you try using dub and specifying `targetType="staticLibrary"`?
> 
> See https://dub.pm/dub-reference/build_settings/#targetpath
> 
> Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with `dub build -v`.

Dub's static library target type does not include dependencies or druntime/phobos.

Typically static libraries do not combine to produce a bigger static library.

January 14
On Sunday, 14 January 2024 at 10:05:12 UTC, Richard (Rikki) Andrew Cattermole wrote:
> On 08/01/2024 7:14 AM, Renato wrote:
>> On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:
>>> [...]
>> 
>> Did you try using dub and specifying `targetType="staticLibrary"`?
>> 
>> See https://dub.pm/dub-reference/build_settings/#targetpath
>> 
>> Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with `dub build -v`.
>
> Dub's static library target type does not include dependencies or druntime/phobos.
>
> Typically static libraries do not combine to produce a bigger static library.

But thats what I need and want.
January 15
On 15/01/2024 12:42 AM, pizza_dox_9999 wrote:
> On Sunday, 14 January 2024 at 10:05:12 UTC, Richard (Rikki) Andrew Cattermole wrote:
>> On 08/01/2024 7:14 AM, Renato wrote:
>>> On Friday, 5 January 2024 at 22:10:31 UTC, pizza_dox_9999 wrote:
>>>> [...]
>>>
>>> Did you try using dub and specifying `targetType="staticLibrary"`?
>>>
>>> See https://dub.pm/dub-reference/build_settings/#targetpath
>>>
>>> Even if you just want the right flags, this could help as you can "ask" dub to print the flags it's using with `dub build -v`.
>>
>> Dub's static library target type does not include dependencies or druntime/phobos.
>>
>> Typically static libraries do not combine to produce a bigger static library.
> 
> But thats what I need and want.

Combining of static libraries is not specific to D.

Although you're going to need to figure out how to get a list of all the static libraries you want to combine. The actual combination should be pretty standard.
January 14
OK to make it clear. I wanted to call d from c so that I can write a n64 game with d. But compiling the d object files while using higher features like classes, resulted in missing dependencys. So because GCC doesnt understands d I need an object file which has everything included d needs to run. Thats my understanding of this situation.
January 15
On 15/01/2024 12:47 AM, pizza_dox_9999 wrote:
> OK to make it clear. I wanted to call d from c so that I can write a n64 game with d. But compiling the d object files while using higher features like classes, resulted in missing dependencys. So because GCC doesnt understands d I need an object file which has everything included d needs to run. Thats my understanding of this situation.

My understanding is druntime is not ported to that platform.

Too limited in resources.

Getting a static library with all dependencies would not help you here.

But yes, GCC does understand D, using GDC which is built on top (same frontend as DMD and LDC).

You are either stuck using -betterC which does not support ``extern(D)`` classes, but does have ``extern(C++)`` classes. Or by using a custom runtime which you will likely have to write yourself and will likely break between compiler releases.
January 14
On Sunday, 14 January 2024 at 11:54:09 UTC, Richard (Rikki) Andrew Cattermole wrote:
> On 15/01/2024 12:47 AM, pizza_dox_9999 wrote:
>> OK to make it clear. I wanted to call d from c so that I can write a n64 game with d. But compiling the d object files while using higher features like classes, resulted in missing dependencys. So because GCC doesnt understands d I need an object file which has everything included d needs to run. Thats my understanding of this situation.
>
> My understanding is druntime is not ported to that platform.
>
> Too limited in resources.
>
> Getting a static library with all dependencies would not help you here.
>
> But yes, GCC does understand D, using GDC which is built on top (same frontend as DMD and LDC).
>
> You are either stuck using -betterC which does not support ``extern(D)`` classes, but does have ``extern(C++)`` classes. Or by using a custom runtime which you will likely have to write yourself and will likely break between compiler releases.

Thank you for the clarification.
Are such things as string so platform dependent in d or the stuff for the class and interface declarations that they aren't cross platform? I meant the gcc used by the n64 toolchain (libdragon).
« First   ‹ Prev
1 2