Re: Patch - Debug builds without optimization
От | Alvaro Herrera |
---|---|
Тема | Re: Patch - Debug builds without optimization |
Дата | |
Msg-id | 1308239462-sup-1118@alvh.no-ip.org обсуждение исходный текст |
Ответ на | Patch - Debug builds without optimization (Radosław Smogura <rsmogura@softperience.eu>) |
Ответы |
Re: Patch - Debug builds without optimization
|
Список | pgsql-hackers |
Excerpts from Radosław Smogura's message of jue jun 16 08:30:27 -0400 2011: > Hello, > > I'm sending following patch which disables optimization when > --enable-debug is passed. It was nasty (for me, at least) that debug > build required passing of CFLAGS with -O0 to get nice traceable code. I disagree with this change. Debug builds are very useful to have in production, and you don't want to be running -O0 there. I have found that you can use a src/Makefile.custom like this for those times when you want to debug stuff in a particular set of files: CFLAGS := $(patsubst -O2,-O0,$(CFLAGS)) Then you remove the .o files that you want to debug, and rerun make. This places the burden on the developer wanting to mess with random code changes. Of course, this means that production builds are not as debuggable, but IME it's much less of a problem there. -- Álvaro Herrera <alvherre@commandprompt.com> The PostgreSQL Company - Command Prompt, Inc. PostgreSQL Replication, Consulting, Custom Development, 24x7 support
В списке pgsql-hackers по дате отправления: