From 30f2e3d8008d52cdccd6dcc5ba5c602079469f49 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Sun, 28 Jul 2024 22:02:14 +0530 Subject: Refactor compiler driver, add running individual stages from cli --- src/cljcc/util.clj | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/cljcc/util.clj') diff --git a/src/cljcc/util.clj b/src/cljcc/util.clj index 81419e4..6c6c88e 100644 --- a/src/cljcc/util.clj +++ b/src/cljcc/util.clj @@ -2,6 +2,12 @@ (:require [clojure.java.shell :refer [sh]] [cljcc.log :as log])) +(defn make-file-name + ([^String filename ^String ext] + (str filename "." ext)) + ([directory filename ext] + (str directory "/" filename "." ext))) + (defn get-os [] (let [os-name (.toLowerCase (System/getProperty "os.name"))] (cond @@ -10,7 +16,7 @@ :else :unsupported))) (defn mac-aarch64? [] - (and (= :mac (get-os)) (= (System/getProperty "os.arch" "aarch64")))) + (and (= :mac (get-os)) (= (System/getProperty "os.arch") "aarch64"))) (defn handle-sh "Preprends arch -x86_64 if running under Mac M chips." -- cgit v1.2.3