cs: fix (system-type 'link)

This commit is contained in:
Matthew Flatt 2020-11-03 15:00:55 -07:00
parent ae2b2c9989
commit 06021193ee
3 changed files with 15 additions and 2 deletions

View File

@ -679,6 +679,8 @@ if test "${enable_shared}" = "yes" ; then
STRIP_LIB_DEBUG=":"
LIBSFX=la
ICP_LIB="${LIBTOOLPROG} --mode=install install -s"
CONFIGURE_RACKET_SO_COMPILE="env PLT_CS_MAKE_LINK_SHARED=y"
else
ICP=cp
LTO="o"

View File

@ -46,7 +46,7 @@
(system-type 'word))
'gc 'cs
'vm 'chez-scheme
'link 'static
'link (if windows? 'windows (system-type 'link))
'machine lib-subpath
'library-subpath (string->bytes/utf-8 lib-subpath)
'library-subpath-convention (if windows? 'windows 'unix)

View File

@ -11,6 +11,11 @@
[(getenv "PLT_CS_MAKE_UNIX_STYLE_MACOS") #t]
[else #f]))
(define unix-link-shared?
(meta-cond
[(getenv "PLT_CS_MAKE_LINK_SHARED") #t]
[else #f]))
(define cross-mode 'infer)
(define (set-cross-mode! m) (set! cross-mode m))
@ -27,7 +32,13 @@
[else 'unix])]
[(word) (if (> (fixnum-width) 32) 64 32)]
[(gc) 'cs]
[(link) 'framework]
[(link) (case (and (not unix-style-macos?)
(machine-type))
[(a6osx ta6osx i3osx ti3osx) 'framework]
[(a6nt ta6nt i3nt ti3nt) 'windows]
[else (if unix-link-shared?
'shared
'static)])]
[(machine) (get-machine-info)]
[(so-suffix) (case (machine-type)
[(a6osx ta6osx i3osx ti3osx) (string->utf8 ".dylib")]