Fixed wrongly typed functions in the code generator.

This commit is contained in:
Samuel Hammersberg 2023-03-28 17:37:29 +02:00
parent e87e2d3870
commit 230a205965
2 changed files with 135 additions and 105 deletions

View file

@ -16,7 +16,10 @@ optimize :: String -> IO String
optimize = readCreateProcess (shell "opt --O3 -S")
compileClang :: String -> IO String
compileClang = readCreateProcess (shell "clang -x ir -o output/hello_world -")
compileClang = readCreateProcess . shell
$ unwords ["clang++"--, "-Lsrc/GC/lib/", "-l:libgcoll.a"
, "-fno-exceptions -x", "ir" ,"-o" ,"output/hello_world"
, "-"]
compile :: String -> IO String
compile s = optimize s >>= compileClang