From 382c19861608e9ab9903c78f1e5c02bc061cc7c8 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Tue, 24 Dec 2024 00:05:11 +0530 Subject: Add driver changes and float regex --- src/cljcc/driver.clj | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/cljcc/driver.clj') 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))))) -- cgit v1.2.3