fix problem where --save-temps didn't work for 3m-generated file (due to lingering handler installed by 3m)
svn: r7320
This commit is contained in:
parent
188186ca25
commit
dec670ff75
|
@ -1370,29 +1370,33 @@
|
||||||
(when (compiler:option:verbose) (printf " [compiling native code to \"~a\"]~n"
|
(when (compiler:option:verbose) (printf " [compiling native code to \"~a\"]~n"
|
||||||
obj-output-path))
|
obj-output-path))
|
||||||
|
|
||||||
;; Compile
|
(let ([clean-up
|
||||||
(let ([compile-thunk
|
(lambda ()
|
||||||
(lambda ()
|
(when (and (compiler:option:clean-intermediate-files)
|
||||||
(with-handlers
|
input-path)
|
||||||
([void (lambda (exn)
|
(if c3m-output-path
|
||||||
(compiler:fatal-error
|
(delete-file c3m-output-path)
|
||||||
#f
|
(delete-file c-output-path))))])
|
||||||
(string-append
|
|
||||||
" C compiler did not complete successfully"
|
;; Compile
|
||||||
(string #\newline)
|
(let ([compile-thunk
|
||||||
(exn-message exn)))
|
(lambda ()
|
||||||
(compiler:report-messages! #t))])
|
(with-handlers
|
||||||
(compile-extension (not (compiler:option:verbose))
|
([void (lambda (exn)
|
||||||
(or c3m-output-path c-output-path) obj-output-path
|
(clean-up)
|
||||||
(list (collection-path "compiler")))))])
|
(compiler:fatal-error
|
||||||
(verbose-time compile-thunk))
|
#f
|
||||||
|
(string-append
|
||||||
;; clean-up
|
" C compiler did not complete successfully"
|
||||||
(when (and (compiler:option:clean-intermediate-files)
|
(string #\newline)
|
||||||
input-path)
|
(exn-message exn)))
|
||||||
(if c3m-output-path
|
(compiler:report-messages! #t))])
|
||||||
(delete-file c3m-output-path)
|
(compile-extension (not (compiler:option:verbose))
|
||||||
(delete-file c-output-path)))
|
(or c3m-output-path c-output-path) obj-output-path
|
||||||
|
(list (collection-path "compiler")))))])
|
||||||
|
(verbose-time compile-thunk))
|
||||||
|
|
||||||
|
(clean-up))
|
||||||
|
|
||||||
(if multi-o?
|
(if multi-o?
|
||||||
(printf " [output to \"~a\"]~n" obj-output-path)
|
(printf " [output to \"~a\"]~n" obj-output-path)
|
||||||
|
|
|
@ -13,7 +13,9 @@
|
||||||
precompiling-header? precompiled-header
|
precompiling-header? precompiled-header
|
||||||
show-info? output-depends-info?
|
show-info? output-depends-info?
|
||||||
gc-variable-stack-through-funcs?)
|
gc-variable-stack-through-funcs?)
|
||||||
(parameterize ([current-output-port (current-output-port)])
|
(parameterize ([current-output-port (current-output-port)] ; because we mutate these...
|
||||||
|
[error-escape-handler (error-escape-handler)]
|
||||||
|
[current-inspector (current-inspector)])
|
||||||
(begin-with-definitions
|
(begin-with-definitions
|
||||||
(define power-inspector (current-inspector))
|
(define power-inspector (current-inspector))
|
||||||
(current-inspector (make-inspector))
|
(current-inspector (make-inspector))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user