cs: fix copied environment setup from cross-compilation
The copy of the environment setup for cross-compilation was out of sync with the main environment configuration.
This commit is contained in:
parent
8b916fc5c1
commit
f63ededab8
|
@ -105,7 +105,7 @@ rktl:
|
|||
mkdir -p ../../bin
|
||||
touch ../../bin/racket
|
||||
|
||||
$(BUILDDIR)expander.$(CSO): expander.sls $(BUILDDIR)compiled/expander.scm $(PRIMITIVES_TABLES) $(EXPANDER_DEPS) $(COMPILE_FILE_DEPS)
|
||||
$(BUILDDIR)expander.$(CSO): expander.sls expander/env.ss $(BUILDDIR)compiled/expander.scm $(PRIMITIVES_TABLES) $(EXPANDER_DEPS) $(COMPILE_FILE_DEPS)
|
||||
$(COMPILE_FILE) expander.sls $(EXPANDER_DEPS)
|
||||
|
||||
$(BUILDDIR)compiled/expander.scm: $(BUILDDIR)compiled/expander.rktl $(CONVERT_DEPS)
|
||||
|
|
|
@ -341,8 +341,8 @@ plain-install-upcased:
|
|||
|
||||
SCHEME_XPATCH = $(SCHEME_SRC)/$(TARGET_MACH)/s/xpatch
|
||||
|
||||
compile-xpatch.$(TARGET_MACH): $(SCHEME_XPATCH) $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss
|
||||
$(SCHEME) --script $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss
|
||||
compile-xpatch.$(TARGET_MACH): $(SCHEME_XPATCH) $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss $(srcdir)/../expander/env.ss
|
||||
$(SCHEME) --script $(srcdir)/mk-cross-serve.ss $(srcdir)/cross-serve.ss $(srcdir)/../expander/env.ss
|
||||
cat cross-serve.so $(SCHEME_XPATCH) > compile-xpatch.$(TARGET_MACH)
|
||||
|
||||
RACKET_XPATCH = chezpart.$(MACH) rumble.$(MACH) thread.$(MACH) \
|
||||
|
|
|
@ -20,23 +20,10 @@
|
|||
(enable-arithmetic-left-associative #t)
|
||||
(generate-procedure-source-information #t)
|
||||
(expand-omit-library-invocations #t)
|
||||
;; Set up the environment
|
||||
(expand `(import (rename (rumble)
|
||||
[correlated? syntax?]
|
||||
[correlated-source syntax-source]
|
||||
[correlated-line syntax-line]
|
||||
[correlated-column syntax-column]
|
||||
[correlated-position syntax-position]
|
||||
[correlated-span syntax-span]
|
||||
[correlated-e syntax-e]
|
||||
[correlated->datum syntax->datum]
|
||||
[datum->correlated datum->syntax]
|
||||
[correlated-property syntax-property]
|
||||
[correlated-property-symbol-keys syntax-property-symbol-keys])
|
||||
(thread)
|
||||
(io)
|
||||
(regexp)
|
||||
(linklet)))
|
||||
;; Set up the environment; ../expander/env.ss must be loaded before compiling
|
||||
(expand (let-syntax ([env (lambda (stx)
|
||||
(datum->syntax stx (list 'quote environment-imports)))])
|
||||
env))
|
||||
;; Serve requests to compile or to fasl data:
|
||||
(let ([in (standard-input-port)]
|
||||
[out (standard-output-port)])
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
(let ([args (command-line-arguments)])
|
||||
(load (cadr args))
|
||||
(compile-file (car args) "cross-serve.so"))
|
||||
|
|
|
@ -87,27 +87,12 @@
|
|||
|
||||
;; ----------------------------------------
|
||||
|
||||
(include "expander/env.ss")
|
||||
|
||||
;; The environment is used to evaluate linklets, so all primitives
|
||||
;; need to be there imported there
|
||||
(parameterize ([expand-omit-library-invocations #f])
|
||||
(eval `(import (rename (rumble)
|
||||
[correlated? syntax?]
|
||||
[correlated-source syntax-source]
|
||||
[correlated-line syntax-line]
|
||||
[correlated-column syntax-column]
|
||||
[correlated-position syntax-position]
|
||||
[correlated-span syntax-span]
|
||||
[correlated-e syntax-e]
|
||||
[correlated->datum syntax->datum]
|
||||
[datum->correlated datum->syntax]
|
||||
[correlated-property syntax-property]
|
||||
[correlated-property-symbol-keys syntax-property-symbol-keys])
|
||||
(thread)
|
||||
(io)
|
||||
(regexp)
|
||||
(linklet)
|
||||
(only (schemify)
|
||||
force-unfasl)))
|
||||
(eval environment-imports) ; defined in "expander/env.ss"
|
||||
;; Ensure that the library is visited, especially for a wpo build:
|
||||
(eval 'variable-set!))
|
||||
|
||||
|
|
19
racket/src/cs/expander/env.ss
Normal file
19
racket/src/cs/expander/env.ss
Normal file
|
@ -0,0 +1,19 @@
|
|||
(define environment-imports
|
||||
`(import (rename (rumble)
|
||||
[correlated? syntax?]
|
||||
[correlated-source syntax-source]
|
||||
[correlated-line syntax-line]
|
||||
[correlated-column syntax-column]
|
||||
[correlated-position syntax-position]
|
||||
[correlated-span syntax-span]
|
||||
[correlated-e syntax-e]
|
||||
[correlated->datum syntax->datum]
|
||||
[datum->correlated datum->syntax]
|
||||
[correlated-property syntax-property]
|
||||
[correlated-property-symbol-keys syntax-property-symbol-keys])
|
||||
(thread)
|
||||
(io)
|
||||
(regexp)
|
||||
(linklet)
|
||||
(only (schemify)
|
||||
force-unfasl)))
|
Loading…
Reference in New Issue
Block a user