I've built my own compiler for a language with a custom extension, out of boredom. It's very bare-bones at the moment, but to proceed I want to use LLC to convert the .ll file generated by my LLVM into an object, and then use GCC to turn that into an executable file. However, my issue comes up when I want to first use that LLC conversion, as I've had trouble building a dev build of LLVM and am currently on a Windows. I've looked into alternative options but none of them seemed to properly function; it's been a few hours of hitting my head against the wall for something so simple, so here I am. I've been looking for something that allows me to make that .ll an object, and then I can continue on my merry way and put it through GCC.
Here is the content of the .ll file at the moment.
; ModuleID = "C:\Users\<mynamelol>\Documents\GitHub\sollux\codegen.py"
target triple = "x86_64-pc-windows-msvc"
target datalayout = ""
define void @"main"()
{
entry:
%".2" = sub i8 4, 2
%".3" = add i8 4, %".2"
%".4" = bitcast [5 x i8]* @"fstr" to i8*
%".5" = call i32 (i8*, ...) @"printf"(i8* %".4", i8 %".3")
ret void
}
declare i32 @"printf"(i8* %".1", ...)
@"fstr" = internal constant [5 x i8] c"%i \0a\00"
And a link to the file, because... why not lol. Gotta appease the StackOverflow answer gods.
If there's any way to use LLC with LLVM while stuck in my predicament that's totally okay as well! Anything helps, thank you for your time, sorry that I'm a little dumb tonight.