racket/rktboot/config.rkt
Matthew Flatt aa9bba9328 add Racket-based bootstrap support
Move "racket/src/cs/bootstrap" from the Racket source repository to
this one, because the bootstrapping implementation needs to track the
Chez Scheme source much more closely than the Racket implementation.
Currently, any Racket v7.1 or later works.

Also update "README.md" and "BUILDING" to get all the information
consistent and in sync with revised build options.

original commit: a9e6e99ea414b4625fe9705e4f3cfd62bbf38ae2
2020-07-25 14:10:25 -06:00

35 lines
1.4 KiB
Racket

#lang racket/base
(require ffi/unsafe/global)
(provide scheme-dir
target-machine
optimize-level-init)
(define ht (get-place-table))
(define scheme-dir (or (hash-ref ht 'make-boot-scheme-dir #f)
(let ([scheme-dir
(getenv "SCHEME_SRC")])
(and scheme-dir
(simplify-path
(path->complete-path scheme-dir))))))
(hash-set! ht 'make-boot-scheme-dir scheme-dir)
(define target-machine (or (hash-ref ht 'make-boot-targate-machine #f)
(getenv "MACH")
(case (system-type)
[(macosx) (if (eqv? 64 (system-type 'word))
"ta6osx"
"ti3osx")]
[(windows) (if (eqv? 64 (system-type 'word))
"ta6nt"
"ti3nt")]
[else
(case (path->string (system-library-subpath #f))
[("x86_64-linux") "ta6le"]
[("i386-linux") "ti3le"]
[else #f])])))
(hash-set! ht 'make-boot-targate-machine target-machine)
(define optimize-level-init 3)