Skip to content

Instantly share code, notes, and snippets.

Last active Jan 12, 2020
What would you like to do?

Bootstrapping Rust with xtensa support

Build xtensa llvm from here

But add the X86 target like so

cmake ../llvm-xtensa -DLLVM_TARGETS_TO_BUILD="Xtensa;X86" -DCMAKE_BUILD_TYPE=Release -G "Ninja"

X86 is required so that Rust can build itself, if your host machine is not x86 use your own host triple.

clone rust from and checkout the xtensa-target branch. Note: the minimum llvm version must be supported rustc, as of 1.33 its llvm 6.0

set llvm root to where you build llvm, e.g ./configure --llvm-root=$PATH_TO_BUILT_LLVM

then build rustc like normal

Build an application

See the xtensa-rust-quickstart crate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment