From 582747a997d2c069f0fa9acdd5f0d030276cd042 Mon Sep 17 00:00:00 2001 From: Samuel Hammersberg Date: Mon, 27 Mar 2023 10:07:04 +0200 Subject: [PATCH] The created binary is now saved in the output folder. --- src/Compiler.hs | 2 +- src/Main.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Compiler.hs b/src/Compiler.hs index 489387a..180914f 100644 --- a/src/Compiler.hs +++ b/src/Compiler.hs @@ -16,7 +16,7 @@ optimize :: String -> IO String optimize = readCreateProcess (shell "opt --O3 -S") compileClang :: String -> IO String -compileClang = readCreateProcess (shell "clang -x ir -o hello_world -") +compileClang = readCreateProcess (shell "clang -x ir -o output/hello_world -") compile :: String -> IO String compile s = optimize s >>= compileClang diff --git a/src/Main.hs b/src/Main.hs index 77e9087..16f1442 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -72,7 +72,7 @@ main' debug s = do debugDotViz compile generatedCode - spawnWait "./hello_world" + spawnWait "./output/hello_world" -- interpred <- fromInterpreterErr $ interpret lifted -- putStrLn "\n-- interpret" -- print interpred