ffi: fix bogus error when using load-foreign-library with bytecmp
As it modifies the linker flags, the do-load-foreign-library function only works with the C compiler.
This commit is contained in:
parent
c8003c2fc4
commit
10c4f6e6d6
1 changed files with 5 additions and 3 deletions
|
|
@ -738,9 +738,11 @@ locations. Returns the path of the first found file."
|
|||
Loads a foreign library."
|
||||
(declare (ignore module force-load supporting-libraries))
|
||||
(let ((compile-form (and (constantp filename env)
|
||||
`((eval-when (:compile-toplevel)
|
||||
(do-load-foreign-library ,filename
|
||||
,(ext:constant-form-value system-library))))))
|
||||
`((ext:with-backend
|
||||
:c/c++ (eval-when (:compile-toplevel)
|
||||
(do-load-foreign-library ,filename
|
||||
,(ext:constant-form-value system-library)))
|
||||
:bytecodes nil))))
|
||||
(dyn-form #+dffi (when (and (not system-library) *use-dffi*)
|
||||
`((si:load-foreign-module ,filename)))
|
||||
#-dffi nil))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue