Skip to content

Commit

Permalink
Turn on -O2 by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
vstakhov committed Feb 25, 2014
1 parent cc948cc commit 9f7bb1e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile.unix
Expand Up @@ -20,7 +20,7 @@ LN ?= ln
LD_SHARED_FLAGS ?= -Wl,-soname,$(SONAME) -shared -lm
LD_UCL_FLAGS ?= -L$(OBJDIR) -Wl,-rpath,$(OBJDIR) -lucl
LD_ADD ?= -lrt
COPT_FLAGS ?= -g -O0
COPT_FLAGS ?= -O2

This comment has been minimized.

Copy link
@jbergstroem

jbergstroem Feb 26, 2014

Contributor

Why not just have it as part of CFLAGS? That way you won't get duplicate flags when passing your own CFLAGS - for instance:

$ # Now I have to unset COPT_FLAGS to get control over CFLAGS
$ CFLAGS="-march=native -O2 -pipe" COPT_FLAGS= make

This comment has been minimized.

Copy link
@vstakhov

vstakhov Feb 26, 2014

Author Owner

This is just a convenient tool to enable/disable optimizations without touching the whole CFLAGS argument that can include some mandatory parts, such as include paths or PIC arguments.

HDEPS = $(SRCDIR)/ucl_hash.h $(SRCDIR)/ucl_chartable.h $(SRCDIR)/ucl_internal.h $(INCLUDEDIR)/ucl.h $(SRCDIR)/xxhash.h
OBJECTS = $(OBJDIR)/ucl_hash.o $(OBJDIR)/ucl_util.o $(OBJDIR)/ucl_parser.o $(OBJDIR)/ucl_emitter.o $(OBJDIR)/xxhash.o

Expand Down
2 changes: 1 addition & 1 deletion Makefile.w32
Expand Up @@ -23,7 +23,7 @@ endif
LD_SHARED_FLAGS ?= -Wl,-soname,$(SONAME) -shared -lm
LD_UCL_FLAGS ?= -L$(OBJDIR) -Wl,-rpath,$(OBJDIR) -lucl
LD_ADD ?= -lrt
COPT_FLAGS ?= -g -O0
COPT_FLAGS ?= -O2
HDEPS = $(SRCDIR)/ucl_hash.h $(SRCDIR)/ucl_chartable.h $(SRCDIR)/ucl_internal.h $(INCLUDEDIR)/ucl.h $(SRCDIR)/xxhash.h
OBJECTS = $(OBJDIR)/ucl_hash.o $(OBJDIR)/ucl_util.o $(OBJDIR)/ucl_parser.o $(OBJDIR)/ucl_emitter.o $(OBJDIR)/xxhash.o

Expand Down

0 comments on commit 9f7bb1e

Please sign in to comment.