mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-16 17:27:33 +02:00
Allow printing of actual gcc messages
This commit is contained in:
parent
5f3b082e27
commit
606c0f4d45
1 changed files with 25 additions and 15 deletions
30
cyclone.scm
30
cyclone.scm
|
@ -253,26 +253,36 @@
|
||||||
|
|
||||||
;; Compile the generated C file
|
;; Compile the generated C file
|
||||||
;; TODO: -I is a hack, real answer is to use 'make install' to place .h file
|
;; TODO: -I is a hack, real answer is to use 'make install' to place .h file
|
||||||
(if cc?
|
|
||||||
(cond
|
(cond
|
||||||
(program?
|
(program?
|
||||||
(let ((objs-str
|
(letrec ((objs-str
|
||||||
(apply
|
(apply
|
||||||
string-append
|
string-append
|
||||||
(map
|
(map
|
||||||
(lambda (i)
|
(lambda (i)
|
||||||
(string-append " " (lib:import->filename i ".o") " "))
|
(string-append " " (lib:import->filename i ".o") " "))
|
||||||
lib-deps))))
|
lib-deps)))
|
||||||
|
(comp-prog-cmd
|
||||||
|
(string-append "gcc " src-file " -I" (cyc:get-include-dir) " -g -c -o " exec-file ".o"))
|
||||||
|
(comp-objs-cmd
|
||||||
|
(string-append "gcc " exec-file ".o " objs-str " -L" (cyc:get-clib-dir) " -lcyclone -lm -I" (cyc:get-include-dir) " -g -o " exec-file)))
|
||||||
;(write `(DEBUG all imports ,lib-deps objs ,objs-str))
|
;(write `(DEBUG all imports ,lib-deps objs ,objs-str))
|
||||||
;(write `(DEBUG ,(lib:get-all-import-deps (cdar in-prog))))
|
;(write `(DEBUG ,(lib:get-all-import-deps (cdar in-prog))))
|
||||||
(if (equal? 0
|
(cond
|
||||||
(system
|
(cc?
|
||||||
(string-append "gcc " src-file " -I" (cyc:get-include-dir) " -g -c -o " exec-file ".o")))
|
(if (equal? 0 (system comp-prog-cmd))
|
||||||
(system
|
(system comp-objs-cmd)))
|
||||||
(string-append "gcc " exec-file ".o " objs-str " -L" (cyc:get-clib-dir) " -lcyclone -lm -I" (cyc:get-include-dir) " -g -o " exec-file)))))
|
|
||||||
(else
|
(else
|
||||||
(system
|
(write comp-prog-cmd)
|
||||||
(string-append "gcc " src-file " -I" (cyc:get-include-dir) " -g -c -o " exec-file ".o")))))))
|
(write comp-objs-cmd)))))
|
||||||
|
(else
|
||||||
|
(let ((comp-lib-cmd
|
||||||
|
(string-append "gcc " src-file " -I" (cyc:get-include-dir) " -g -c -o " exec-file ".o")))
|
||||||
|
(cond
|
||||||
|
(cc?
|
||||||
|
(system comp-lib-cmd))
|
||||||
|
(else
|
||||||
|
(write comp-lib-cmd))))))))
|
||||||
|
|
||||||
|
|
||||||
;; Handle command line arguments
|
;; Handle command line arguments
|
||||||
|
|
Loading…
Add table
Reference in a new issue