perhaps naievely i thought i could generate source from rust that i couuld
compile into an iOS project; i'm flailing around with minimal knowledge of the
toolchain here. (originally i hoped i could go rust->LLVM IR->C but thats no
longer available )
my current attempt is to use generated ARM assembly source,
rustc -S main.rs -o main.s -Z no-asm-comment
If i include this resulting source in an iOS project i run into what appears to
be unsupported directives - eg .save, .setfp ; also __aeabi_fadd(PLT)
i'm told some of these are "metadata for exception handling", and the (PLT) can
just be removed.
Other than more hacks (like trying to strip various directives with regex :) )
- does anyone have any further ideas on what I could try - maybe there are more
optiona on what rust is trying to generate
.eabi_attribute 6, 2
.eabi_attribute 8, 1
.eabi_attribute 9, 1
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.file "main.rc"
.text
.globl _ZN14__extensions__9meth_24273add17_7a292226f3cda72f3_00E
.align 2
.type _ZN14__extensions__9meth_24273add17_7a292226f3cda72f3_00E,%function
_ZN14__extensions__9meth_24273add17_7a292226f3cda72f3_00E:
.fnstart
.Leh_func_begin0:
.save {r11, lr} <<<<<<<<<<<<<<<<<<
push {r11, lr}
.setfp r11, sp <<<<<<<<<<<
mov r11, sp
.pad #24
sub sp, sp, #24
ldr r3, [r1]
ldr r12, [r2]
ldr r3, [r3]
str r0, [r11, #-4]
mov r0, r3
str r1, [r11, #-8]
mov r1, r12
str r2, [sp, #12]
bl __aeabi_fadd(PLT) <<<<<<<<<<<<<<<<
ldr r1, [r11, #-4]
str r0, [r1]
ldr r0, [r11, #-8]
ldr r2, [r0]
ldr r3, [sp, #12]
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev