diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-12-28 19:05:35 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-12-28 19:05:35 -0800 |
commit | 2876225d0547ea7833991b9da8a72427e4bc69b9 (patch) | |
tree | de2d06a135fdea90d49bf9ddc0c46ffeaed2ad9a | |
parent | afe911ea000c2a8c49be900bc21e38d640d4bef4 (diff) |
Force -Os for upb_def.o
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -48,11 +48,17 @@ clean: # The core library (src/libupb.a) SRC=src/upb.c src/upb_parse.c src/upb_table.c src/upb_def.c src/upb_data.c \ descriptor/descriptor.c - #src/upb_serialize.c descriptor/descriptor.c +# Override the optimization level for upb_def.o, because it is not in the +# critical path but gets very large when -O3 is used. +src/upb_def.o: src/upb_def.c + $(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< +src/upb_def.lo: src/upb_def.c + $(CC) $(CFLAGS) $(CPPFLAGS) -Os -c -o $@ $< -fPIC + STATICOBJ=$(patsubst %.c,%.o,$(SRC)) SHAREDOBJ=$(patsubst %.c,%.lo,$(SRC)) # building shared objects is like building static ones, except -fPIC is added. -%.lo : %.c ; $(CC) -fPIC $(CPPFLAGS) $(CFLAGS) -c -o $@ $< +%.lo : %.c ; $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< -fPIC $(LIBUPB): $(STATICOBJ) ar rcs $(LIBUPB) $(STATICOBJ) $(LIBUPB_PIC): $(SHAREDOBJ) |