Get DUB to skip linker and output object files?

Denis Feklushkin feklushkin.denis at gmail.com
Wed Mar 18 13:32:01 UTC 2020


On Wednesday, 18 March 2020 at 11:48:53 UTC, Markus Pursche wrote:
> Hi, we are experimenting with cross-compiling from Windows to 
> PS4, we have figured out how to compile (using LDC with 
> -betterC) individual .d files into object files (.o), which I 
> can then link using the PS4 SDK into a .elf and it all runs.
>
> I would very much like to integrate the first part of that 
> toolchain with Dub since it would make testing different 
> -betterC enabled libraries for ABI compatibility easier.
>
> Here is my dub.json
>
> https://pastebin.com/s7XexRBD
>
> However, this is my output when running dub build -v
>
> https://pastebin.com/TyLi5sid
>
> My first observation is that it is still trying to link 
> everything, is there any way I can disable this?
>
> The second thing is that it assumes .obj and .exe files instead 
> of .o and .elf, should I perhaps change the target platform 
> according to DUB as well? Would that pass another triple to LDC?

DUB is bad for cross-compilation now.

Consider a Meson instead of a DUB. there it already works.

Sample, will work for BetterC:
https://github.com/denizzzka/d_c_arm_test


More information about the Digitalmars-d mailing list