setup/dirs: improve host lib dir search for cross-compile

Insteda of just consulting `lib-search-dirs` in the host system's
config during cross-build mode, use `lib-dir` if set to arrive at
the expected default when `lib-search-dirs` is not set.
This commit is contained in:
Matthew Flatt 2019-03-08 18:21:34 -07:00
parent e4517afb56
commit b7e0d52b96

View File

@ -191,7 +191,9 @@
(combine-search
(to-path (hash-ref (force host-config) 'lib-search-dirs #f))
(list (find-user-lib-dir)
(build-path
(exe-relative-path->complete-path (find-system-path 'host-collects-dir))
'up
"lib")))))
(let ([coll-dir (exe-relative-path->complete-path
(find-system-path 'host-collects-dir))])
(or (let ([p (hash-ref (force host-config) 'lib-dir #f)])
(and p
(path->complete-path p coll-dir)))
(build-path coll-dir 'up "lib")))))))