Someone can correct me, but I don't know that we have a target
toolchain available (e.g. gcc installed to the system).
Of course there is a target cross compiler set up on the build host.
You have a few options.
The first (and most principled approach) would be to author a
V2-component to be deployed to the target. Your code notwithstanding,
the docs for how to do that are here:
https://fuchsia.dev/fuchsia-src/development/components/build
Another option would be to define an executable() BUILD.gn target and
add it to your product's product_bootfs_labels list. This will
compile your executable and place it in the image (iirc in /boot/bin).
We use this as a quick hack to get testing binaries inside the image
that we're building/flashing to a board. If you already have a booted
system, and aren't reflashing or repaving, this is probably more
trouble than it's worth.
On Tue, Dec 22, 2020 at 12:13 AM fctorial <
fcto...@gmail.com> wrote:
>
> How do I compile and run a program that makes use of zircon syscalls? Does the fuchsia image contain a compiler(and editor) that could be used for this?
>
> --
> All posts must follow the Fuchsia Code of Conduct
https://fuchsia.dev/fuchsia-src/CODE_OF_CONDUCT or may be removed.
> ---
> To unsubscribe from this group and stop receiving emails from it, send an email to
zircon-dev+...@fuchsia.dev.