Skip to content

Instantly share code, notes, and snippets.

@MabezDev
Last active May 29, 2024 10:17
Show Gist options
  • Save MabezDev/e7fc85a42d0c22e2bd0b902a4f3f7c9d to your computer and use it in GitHub Desktop.
Save MabezDev/e7fc85a42d0c22e2bd0b902a4f3f7c9d to your computer and use it in GitHub Desktop.
{
"arch": "xtensa",
"cpu": "generic",
"crt-objects-fallback": "false",
"data-layout": "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-n32",
"emit-debug-gdb-scripts": false,
"is-builtin": false,
"linker": "xtensa-esp32-elf-gcc",
"linker-flavor": "gnu-cc",
"llvm-target": "xtensa-none-elf",
"max-atomic-width": 32,
"metadata": {
"description": "Xtensa ESP32",
"host_tools": false,
"std": false,
"tier": 3
},
"panic-strategy": "abort",
"relocation-model": "static",
"target-pointer-width": "32"
}
#![no_std]
#![no_core]
#![no_main]
#![feature(no_core)]
#![feature(lang_items)]
#[lang = "sized"]
trait Sized {}
#[no_mangle]
fn hello_xtensa() -> i32 {
1
}

rustc +esp-master test.rs --target esp32.json --emit llvm-ir

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