Skip to content

Cross-compiling in LDC? #283

Description

@TurkeyMan

I need to start doing ARM/RISC-V/XTENSA builds... LDC can target these platforms with compiler flags, but I'm not sure how to support this in the VS configuration matrix.
The wizard creates configurations that target Windows x86/x64, and it builds MS-COFF and uses the MS linker.
I need to add a new item to the 'platform' column in the matrix, where such configurations cause LDC to emit ELF (just needs to give -mtriple=riscv32-unknown-elf to the compiler), but also swap the MS linker for the LLVM linker... which seems more complicated.

I tried to hack this by cloning the x64 config and use a post-build step to link instead of the linker, but when I add a platform to the matrix, configurations for that new platform seem to have the LDC compiler disappear from the configuration completely...

What's the process to do this nicely?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions