Skip to content

Commit

Permalink
Support for non-glibc versions of linux (musl, android) (#3336)
Browse files Browse the repository at this point in the history
* Support for non-glibc versions of linux (musl, android)

* [ update ] following Zoe's suggestion

* [ fix ] thunking the proc

---------

Co-authored-by: Guillaume Allais <[email protected]>
  • Loading branch information
spocino and gallais authored Feb 6, 2025
1 parent 2471f09 commit e33de48
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Compiler/Scheme/Chez.idr
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ schHeader chez libs whole
(import (chezscheme))
(case (machine-type)
[(i3fb ti3fb a6fb ta6fb) #f]
[(i3le ti3le a6le ta6le tarm64le) (load-shared-object "libc.so.6")]
[(i3le ti3le a6le ta6le tarm64le)
(with-exception-handler (lambda(x) (load-shared-object "libc.so"))
(lambda () (load-shared-object "libc.so.6")))]
[(i3osx ti3osx a6osx ta6osx tarm64osx tppc32osx tppc64osx) (load-shared-object "libc.dylib")]
[(i3nt ti3nt a6nt ta6nt) (load-shared-object "msvcrt.dll")]
[else (load-shared-object "libc.so")])
Expand Down

0 comments on commit e33de48

Please sign in to comment.