My ASDF system depends on some external systems, e.g. clsql-mysql. I want to compile these external systems with particular optimization settings so I have, in my ASD file:
;;; When compiling external systems (and by default), use these optimization settings: (declaim (optimize (compilation-speed 0) (speed 3) (safety 1) (debug 0) (space 0)))
(defsystem :my-system :depends-on (:clsql-mysql ...) ... )
Unfortunately, the compilation of clsql-mysql at these optimization settings produces some SBCL optimization notes that I want to muffle. Is it possible to muffle the warnings for just clsql-mysql but not for my-system? I suspect that there is some way to use an :around or :before method to control the compilation of external systems, but I could not figure this out from the ASDF manual.
TIA
On Wed, Feb 22, 2012 at 12:43, Alistair Gee alistair.gee@gmail.com wrote:
My ASDF system depends on some external systems, e.g. clsql-mysql. I want to compile these external systems with particular optimization settings so I have, in my ASD file:
;;; When compiling external systems (and by default), use these optimization settings: (declaim (optimize (compilation-speed 0) (speed 3) (safety 1) (debug 0) (space 0)))
(defsystem :my-system :depends-on (:clsql-mysql ...) ... )
Unfortunately, the compilation of clsql-mysql at these optimization settings produces some SBCL optimization notes that I want to muffle. Is it possible to muffle the warnings for just clsql-mysql but not for my-system? I suspect that there is some way to use an :around or :before method to control the compilation of external systems, but I could not figure this out from the ASDF manual.
With a recent ASDF (2.019 or 2.20), you can use the :around-compile hook for fun and profit.
It might be bad taste to modify the clsql-mysql.asd to add a :around-compile hook to it, but if that works for you, I suggest you (1) globally proclaim the optimization settings for your libraries in your build script, before you load any .asd file, which will hopefully muffle all warnings you want to hush. (2) use :around-compile in YOUR system, so it is compiled with the optimization settings you care about and muffles just the warnings you want and none other, using handler-bind or whatever declaration or proclamation makes SBCL happy.
I hope this helps.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org - "If you're so smart, how come you're not rich?" - "If you're so rich, how come you're not smart?" — narrated by Steven E. Landsburg, "The Armchair Economist"