Skip to content

Commit bd0b19b

Browse files
committed
fix(PROS): use soft-float ABI for SDK funcs
Fixes PROS programs don't use soft float ABI for VEX SDK functions Fixes #26 Switch the PROS build back to the armv7a-vex-v5 target so that it correctly resolves `extern "system"` functions keep Thumb mode disabled as expected this time.
1 parent ec8f870 commit bd0b19b

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

xtask/src/main.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,14 @@ fn test() {
151151

152152
fn build(target: FfiTarget, opts: Vec<String>) {
153153
let target_args: &[&str] = match target {
154-
// Normal hard-float build, but avoid building std to prevent accidentally using the wrong
155-
// allocator. Rust's std port will try to manage the heap, but PROS is already doing that.
156154
FfiTarget::Pros => &[
157-
"--target=armv7a-none-eabihf",
155+
// Use vex-v5 instead of none-eabihf so that extern "System" functions resolve to the
156+
// soft-float AAPCS ABI that VEXos uses.
157+
"--target=armv7a-vex-v5",
158+
// HACK(PROS): PROS programs hang when v5gdb is built for Thumb. (#25)
159+
r#"--config=target."cfg(true)".rustflags=["-Ctarget-feature=-thumb-mode"]"#,
160+
// Avoid building std to prevent accidentally using the wrong allocator. Rust's std
161+
// port will try to manage the heap, but PROS is already doing that.
158162
"-Zbuild-std=core",
159163
"-Fv5gdb/pros",
160164
],

0 commit comments

Comments
 (0)