diff --git a/racket/collects/setup/setup-unit.rkt b/racket/collects/setup/setup-unit.rkt index 5c43f841d3..49f54370c2 100644 --- a/racket/collects/setup/setup-unit.rkt +++ b/racket/collects/setup/setup-unit.rkt @@ -788,8 +788,9 @@ (unless (relative-path-string? v) (error "result is not a relative path string: " v)) (define p (build-path (cc-path cc) v)) - (unless (file-exists? p) - (error "installer file does not exist: " p))))) + (unless (or (file-exists? p) + (bytecode-file-exists? p)) + (error "installer file does not exista: " p))))) (define installer (with-handlers ([exn:fail? (lambda (exn) @@ -817,6 +818,11 @@ [else (installer dir)])))))) + (define (bytecode-file-exists? p) + (let-values ([(base name dir?) (split-path p)]) + (define zo (build-path base mode-dir (path-add-suffix name #".zo"))) + (file-exists? zo))) + (define (this-platform? info) (define sys (call-info info