Use run.sh to compile and run the odin compiler under different architectures.
This works by cloning a local copy of the compiler and mounting the current directory
as a volume in the container. Architecture is controlled by the ${g_archs}
variable in run.sh which can be treated as an array. This can be set externally:
g_archs=arm64 ./run.sh initor by the -A|--arch command line option:
./run.sh --arch="arm64 amd64" makeAvailable architectures:
- amd64
- arm64
- arm
- i386
- native
Native will run outside of a container. Currently, arm is the only one that doesn't build the compiler successfully.
The init command will build the container needed to run a specific architecture.
The make command will build the odin compiler inside of a container.
The odin command, will execute the compiler with your provided arguments inside a container
Example:
ps1 :) ./run.sh --arch="arm64 native i386 amd64" odin run example.odin -file
hello from arm64
hello from amd64
hello from i386
hello from amd64
ps1 :) |- podman
- buildah
- qemu-user-static (or whatever your package manager calls it)