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"
|
||||
obj-output-path))
|
||||
|
||||
;; Compile
|
||||
(let ([compile-thunk
|
||||
(lambda ()
|
||||
(with-handlers
|
||||
([void (lambda (exn)
|
||||
(compiler:fatal-error
|
||||
#f
|
||||
(string-append
|
||||
" C compiler did not complete successfully"
|
||||
(string #\newline)
|
||||
(exn-message exn)))
|
||||
(compiler:report-messages! #t))])
|
||||
(compile-extension (not (compiler:option:verbose))
|
||||
(or c3m-output-path c-output-path) obj-output-path
|
||||
(list (collection-path "compiler")))))])
|
||||
(verbose-time compile-thunk))
|
||||
|
||||
;; clean-up
|
||||
(when (and (compiler:option:clean-intermediate-files)
|
||||
input-path)
|
||||
(if c3m-output-path
|
||||
(delete-file c3m-output-path)
|
||||
(delete-file c-output-path)))
|
||||
(let ([clean-up
|
||||
(lambda ()
|
||||
(when (and (compiler:option:clean-intermediate-files)
|
||||
input-path)
|
||||
(if c3m-output-path
|
||||
(delete-file c3m-output-path)
|
||||
(delete-file c-output-path))))])
|
||||
|
||||
;; Compile
|
||||
(let ([compile-thunk
|
||||
(lambda ()
|
||||
(with-handlers
|
||||
([void (lambda (exn)
|
||||
(clean-up)
|
||||
(compiler:fatal-error
|
||||
#f
|
||||
(string-append
|
||||
" C compiler did not complete successfully"
|
||||
(string #\newline)
|
||||
(exn-message exn)))
|
||||
(compiler:report-messages! #t))])
|
||||
(compile-extension (not (compiler:option:verbose))
|
||||
(or c3m-output-path c-output-path) obj-output-path
|
||||
(list (collection-path "compiler")))))])
|
||||
(verbose-time compile-thunk))
|
||||
|
||||
(clean-up))
|
||||
|
||||
(if multi-o?
|
||||
(printf " [output to \"~a\"]~n" obj-output-path)
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
precompiling-header? precompiled-header
|
||||
show-info? output-depends-info?
|
||||
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
|
||||
(define power-inspector (current-inspector))
|
||||
(current-inspector (make-inspector))
|
||||
|
|
Loading…
Reference in New Issue
Block a user