diff options
Diffstat (limited to 'src/cljcc/driver.clj')
| -rw-r--r-- | src/cljcc/driver.clj | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/cljcc/driver.clj b/src/cljcc/driver.clj index 2db8c0b..20d2d22 100644 --- a/src/cljcc/driver.clj +++ b/src/cljcc/driver.clj @@ -41,18 +41,16 @@ file (io/file preprocessed-file-path) source (slurp file) assembly-ast (c/assembly-from-src source) - _ (log/info (str "Generated assembly output: " (with-out-str (pp/pprint assembly-ast)))) assembly-output (e/emit assembly-ast) - _ (log/info (str "Generated ASM output: " (with-out-str (pp/pprint assembly-output)))) assembly-out-file-path (make-file-name directory (remove-extension filename) "s") - _ (println assembly-output) _ (spit assembly-out-file-path assembly-output) output-file (if (:generate-object-file options) (str directory "/" (str file-without-ext ".o")) (str directory "/" file-without-ext)) + libs (str/join " " (:libs options)) output (if (:generate-object-file options) - (handle-sh "gcc" "-c" assembly-file "-o" output-file) - (handle-sh "gcc" assembly-file "-o" output-file))] + (handle-sh "gcc" "-c" assembly-file "-o" output-file libs) + (handle-sh "gcc" assembly-file "-o" output-file libs))] (if (= 1 (:exit output)) (throw (Exception. ^String (:err output))) (log/info (str "Successfully created executable at: " output-file))))) |
