Stream: t-compiler

Topic: cross compilation

Armando Venturi (Jun 12 2019 at 07:39, on Zulip):

Hi there! I'm trying to create and compile an executable for Illumos. I'm currently working on my mac and so I go with the command "rustup target add" in order to add my target operating system. But now where can I create and find my solaris executable and how can I compile it on my target OS? Thanks everyone in advance.

pnkfelix (Jun 12 2019 at 12:57, on Zulip):

@Armando Venturi there is a blog post describing an analogous process for cross-compiling on Mac targeting Linux here:

pnkfelix (Jun 12 2019 at 12:58, on Zulip):

in particular, the analogous command there is cargo build --target=x86_64-unknown-linux-gnu --features 'standalone'

pnkfelix (Jun 12 2019 at 12:58, on Zulip):

so i imagine there's a way to adapt that line to target Illumos

pnkfelix (Jun 12 2019 at 12:59, on Zulip):

and then the binary would be found somewhere underneath ./target/debug/$TARGET/, for appropriate choice of $TARGET

pnkfelix (Jun 12 2019 at 13:00, on Zulip):

but the rest of that post may include important hints to other things you'll need to resolve, like the fact that you'll need a cross-compiling linker

Last update: Jul 03 2020 at 17:55UTC