diff options
| author | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-12-24 00:05:11 +0530 |
|---|---|---|
| committer | Shagun Agrawal <agrawalshagun07@gmail.com> | 2024-12-24 00:05:11 +0530 |
| commit | 382c19861608e9ab9903c78f1e5c02bc061cc7c8 (patch) | |
| tree | cbf2d16132a71b21e0f0e81f6b724685dcb242aa /src/cljcc/driver.clj | |
| parent | b50b3552de7e0e6bf71d78e59adec5e305d7618b (diff) | |
Add driver changes and float regex
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))))) |
