fix executable creation for cross-installation
This commit is contained in:
parent
6beff43439
commit
0e4d9a68af
|
@ -473,9 +473,17 @@ A unit that imports nothing and exports @racket[compiler:embed^].}
|
|||
|
||||
@defmodule[compiler/find-exe]
|
||||
|
||||
@defproc[(find-exe [gracket? any/c #f]
|
||||
[variant (or/c 'cgc '3m) (system-type 'gc)])
|
||||
@defproc[(find-exe [#:cross? cross? any/c #f]
|
||||
[gracket? any/c #f]
|
||||
[variant (or/c 'cgc '3m) (if cross?
|
||||
(cross-system-type 'gc)
|
||||
(system-type 'gc))])
|
||||
path?]{
|
||||
|
||||
Finds the path to the @exec{racket} or @exec{gracket} (when
|
||||
@racket[gracket?] is true) executable.}
|
||||
@racket[gracket?] is true) executable.
|
||||
|
||||
If @racket[cross?] is true, the executable is found for the target
|
||||
platform in @seclink["cross-system"]{cross-installation mode}.
|
||||
|
||||
@history[#:changed "6.2.900.11" @elem{Added the @racket[#:cross?] argument.}]}
|
||||
|
|
|
@ -1413,7 +1413,7 @@
|
|||
cmdline)) . < . 80))
|
||||
(error 'create-embedding-executable "command line too long: ~e" cmdline))
|
||||
(check-collects-path 'create-embedding-executable collects-path collects-path-bytes)
|
||||
(let ([exe (find-exe mred? variant)])
|
||||
(let ([exe (find-exe #:cross? #t mred? variant)])
|
||||
(when verbose?
|
||||
(eprintf "Copying to ~s\n" dest))
|
||||
(let-values ([(dest-exe orig-exe osx?)
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
#lang racket/base
|
||||
(require setup/dirs
|
||||
setup/variant)
|
||||
setup/variant
|
||||
setup/cross-system)
|
||||
(provide find-exe)
|
||||
|
||||
(define (find-exe [mred? #f] [variant (system-type 'gc)])
|
||||
(define (find-exe #:cross? [cross? #f]
|
||||
[mred? #f]
|
||||
[variant (if cross?
|
||||
(cross-system-type 'gc)
|
||||
(system-type 'gc))])
|
||||
(let* ([base (if mred?
|
||||
(find-lib-dir)
|
||||
(find-console-bin-dir))]
|
||||
|
@ -15,7 +20,9 @@
|
|||
variant))])
|
||||
(let ([exe (build-path
|
||||
base
|
||||
(case (system-type)
|
||||
(case (if cross?
|
||||
(cross-system-type)
|
||||
(system-type))
|
||||
[(macosx)
|
||||
(cond
|
||||
[(not mred?)
|
||||
|
|
Loading…
Reference in New Issue
Block a user