mason icon indicating copy to clipboard operation
mason copied to clipboard

Put -DNDEBUG in compile flags

Open springmeyer opened this issue 9 years ago • 3 comments

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.

springmeyer avatar Feb 24 '16 02:02 springmeyer

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.

jfirebaugh avatar Mar 12 '16 00:03 jfirebaugh

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 ?

springmeyer avatar Apr 06 '16 22:04 springmeyer

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).

springmeyer avatar Feb 28 '17 23:02 springmeyer