maddymakesgames / Rust-CE

A proof-of-concept of rust on the ti-84+ce
MIT License
33 stars 1 forks source link

Running results in llc error #4

Open u9g opened 11 months ago

u9g commented 11 months ago

After installing the CE C++ Toolchain and installing the wasm32-unknown-unknown target, I still get this error from llc

$ cargo make ce
[cargo-make] INFO - cargo make 0.37.0
[cargo-make] INFO - Calling cargo metadata to extract project info
[cargo-make] INFO - Cargo metadata done
[cargo-make] INFO - Project: ti_84_poc
[cargo-make] INFO - Build File: Makefile.toml
[cargo-make] INFO - Task: ce
[cargo-make] INFO - Profile: development
[cargo-make] INFO - Running Task: legacy-migration
[cargo-make] INFO - Execute Command: "mkdir" "-p" "bin"
[cargo-make] INFO - Execute Command: "mkdir" "-p" "incremental"
[cargo-make] INFO - Execute Command: "rustc" "--emit=llvm-ir" "-C" "debuginfo=0" "./src/main.rs" "--target=wasm32-unknown-unknown" "-o" "./incremental/ti_84_poc.ll"
[cargo-make] INFO - Execute Command: "sed" "-i" "s/wasm32-unknown-unknown/ez80/" "./incremental/ti_84_poc.ll"
[cargo-make] INFO - Execute Command: "tools/llc" "./incremental/ti_84_poc.ll" "-o" "./incremental/ti_84_poc.s"
tools/llc: error: tools/llc: ./incremental/ti_84_poc.ll:14:28: error: expected type
  call void @os_PutStrFull(ptr @alloc_e042fdd9086f3d2a651c7fc77a9ca2e3, i32 17) #2
                           ^
[cargo-make] ERROR - Error while executing command, exit code: 1
[cargo-make] WARN - Build Failed.
Alekuso commented 10 months ago

The llc binary in this repo is too old, and you need to compile llvm yourself to fix it

SpeedyGo55 commented 3 months ago

how can i compile the llc from the repo? i sadly dont find any good documentation

Alekuso commented 3 months ago

how can i compile the llc from the repo? i sadly dont find any good documentation

(You have to compile THIS fork of llvm, this one has the support of the Z80) https://github.com/jacobly0/llvm-project

The rest is in the readme. However, it is easier to compile it on Linux than it is on Windows I ran without any issue when compiling it on my Ubuntu WSL meanwhile I always get an error in Windows

SpeedyGo55 commented 3 months ago

could you take a look at #6 ? maybe you can help