Permalink
Browse files

add -O3 to CFLAGS by default

  • Loading branch information...
1 parent fc66d30 commit f8fb9474aad9ffc6921755eda3006475f556c4ea @matz matz committed Apr 29, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 tools/mrbc/Makefile
  2. +1 −1 tools/mruby/Makefile
View
@@ -32,7 +32,7 @@ LL = gcc
YACC = bison
DEBUG_MODE = 1
ifeq ($(DEBUG_MODE),1)
-CFLAGS = -g
+CFLAGS = -g -O3
else
CFLAGS = -O3
endif
@@ -40,7 +40,7 @@ LL = gcc
YACC = bison
DEBUG_MODE = 1
ifeq ($(DEBUG_MODE),1)
-CFLAGS = -g
+CFLAGS = -g -O3
else
CFLAGS = -O3
endif

2 comments on commit f8fb947

@razielgn

Is mixing debug symbols with extreme optimizations a good idea?

@matz
Member
matz commented on f8fb947 Apr 30, 2012

In my opinion, yes. Since people usually use the binary compile with -O3, debugging should be done in that level if possible.
Of course -O3 makes stepping execution difficult. You can re-compile without -O3 in that case.

Please sign in to comment.