Rust-CE icon indicating copy to clipboard operation
Rust-CE copied to clipboard

Running results in llc error

Open u9g opened this issue 1 year ago • 4 comments

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.

u9g avatar Sep 10 '23 18:09 u9g

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

Alekuso avatar Nov 01 '23 18:11 Alekuso

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

SpeedyGo55 avatar May 29 '24 06:05 SpeedyGo55

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

Alekuso avatar May 29 '24 13:05 Alekuso

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

SpeedyGo55 avatar May 30 '24 11:05 SpeedyGo55