Commit 16458b7a authored by Francois-Rene Rideau's avatar Francois-Rene Rideau

Fix monolithic-dll-op and add a regression test on ECL.

parent ed428096
......@@ -81,12 +81,12 @@
(defclass monolithic-fasl-op (monolithic-bundle-compile-op basic-fasl-op non-propagating-operation) ()
(:documentation "Create a single fasl for the system and its dependencies."))
(defclass monolithic-lib-op (monolithic-bundle-compile-op basic-compile-op non-propagating-operation no-ld-flags-op)
(defclass monolithic-lib-op (monolithic-bundle-compile-op non-propagating-operation no-ld-flags-op)
((bundle-type :initform #+(or ecl mkcl) :lib #-(or ecl mkcl) :no-output-file))
(:documentation #+(or ecl mkcl) "Create a single linkable library for the system and its dependencies."
#-(or ecl mkcl) "Compile a system and its dependencies."))
(defclass monolithic-dll-op (monolithic-bundle-compile-op sideway-operation selfward-operation no-ld-flags-op)
(defclass monolithic-dll-op (monolithic-bundle-compile-op non-propagating-operation no-ld-flags-op)
((bundle-type :initform :dll))
(:documentation "Create a single dynamic (.so/.dll) library for the system and its dependencies."))
......
(defpackage :test-asdf/monodll-1 (:use)) ;; dummy, for package-system dependencies.
#+ecl
(ffi:clines "
extern int always_7();
int always_7()
{
return 7;
}
")
(defpackage :test-asdf/monodll-user (:use)) ;; dummy, for package-system dependencies.
(in-package :test-package)
(ffi:def-function "always_42" () :returning :int)
(defpackage :test-asdf/monodll (:use :test-asdf/monodll-1)) ;; dummy, for package-system dependencies.
#+ecl
(ffi:clines "
extern int always_42();
int always_42()
{
return 6*always_7();
}
")
......@@ -43,10 +43,14 @@
(operate 'monolithic-fasl-op :test-asdf/bundle-2)
(assert (probe-file *mono-bundle-2*))
;;; Test DLL-op on ECL.
;;; Test dll-op and monolithic-dll-op on ECL.
#+ecl
(progn
(operate 'dll-op :test-asdf/dll-test)
(si:load-foreign-module (first (output-files 'dll-op :test-asdf/dll-test)))
(operate 'load-op :test-asdf/dll-user)
(assert (= (test-package::sample-function) 42)))
(assert (= (test-package::sample-function) 42))
(operate 'monolithic-dll-op :test-asdf/monodll)
(si:load-foreign-module (first (output-files 'monolithic-dll-op :test-asdf/monodll)))
(operate 'load-op :test-asdf/monodll-user)
(assert (= (test-package::always-42) 42)))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment