mason
mason copied to clipboard
Put -DNDEBUG in compile flags
Libraries like harfbuzz do not put -DNDEBUG
in the compiler flags by defaults, which leaves assert
live. For release builds we should ensure asserts
are removed for best perf. Instead of adding per package I think this should be global. Not a high priority so just ticketing for later.
Not sure about this being global. I'd like the ability to make a x.y.z-debug
version of a package that includes asserts, symbols, etc. for development.
We should definitely not do anything to make debug packages harder. That raises the issue of whether debug packages should be a customized script or if mason should make it easy to make/install debug builds? mason install libpng 1.6.21 --debug
?
Note: I've been finding and fixing many packages build with autotools that are not being built with any optimization flags. After incrementally fixing a dozen or so (to help enable Mapnik to finally move to mason) I wrote a script to find them all. There are so many I've paused on this and I think we should address systematically by adding the ability for mason to build both Release and Debug (and also potentially sanitized and lto builds).