bug=420904 support for custom options for jsinterp.c in js shell build scripts. This is outside of tree.
authorigor@mir2.org
Wed, 12 Mar 2008 07:36:06 -0700
changeset 12943 442e479a1249a898727bfe04bbf5411e28eda5c1
parent 12942 82e31e15bc4964964a0c8f14a494bf0f4da16b44
child 12944 aeadd2cd19ba9e0660a4e8c84382e82db0ba73d4
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs420904
milestone1.9b5pre
bug=420904 support for custom options for jsinterp.c in js shell build scripts. This is outside of tree.
js/src/Makefile.ref
js/src/config.mk
js/src/rules.mk
--- a/js/src/Makefile.ref
+++ b/js/src/Makefile.ref
@@ -79,16 +79,17 @@ ifdef JS_HAS_FILE_OBJECT
 DEFINES += -DJS_HAS_FILE_OBJECT
 endif
 
 #
 # XCFLAGS may be set in the environment or on the gmake command line
 #
 #CFLAGS += -DDEBUG -DDEBUG_brendan -DJS_ARENAMETER -DJS_HASHMETER -DJS_DUMP_PROPTREE_STATS -DJS_DUMP_SCOPE_METERS -DJS_SCOPE_DEPTH_METER -DJS_BASIC_STATS
 CFLAGS          += $(OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS)
+INTERP_CFLAGS   += $(INTERP_OPTIMIZER) $(OS_CFLAGS) $(DEFINES) $(INCLUDES) $(XCFLAGS) $(INTERP_XCFLAGS)
 
 LDFLAGS		= $(XLDFLAGS)
 
 ifdef MOZ_SHARK
 DEFINES += -DMOZ_SHARK
 CFLAGS += -F/System/Library/PrivateFrameworks
 LDFLAGS += -F/System/Library/PrivateFrameworks -framework CHUD
 endif
--- a/js/src/config.mk
+++ b/js/src/config.mk
@@ -114,27 +114,31 @@ CP = cp
 else
 INSTALL	= $(DIST)/bin/nsinstall
 CP = cp
 endif
 
 ifdef BUILD_OPT
 ifdef USE_MSVC
 OPTIMIZER  = -O2 -GL
+INTERP_OPTIMIZER = -O2 -GL
 LDFLAGS    += -LTCG
 else
 OPTIMIZER  = -Os
+INTERP_OPTIMIZER = -Os
 endif
 DEFINES    += -UDEBUG -DNDEBUG -UDEBUG_$(USER)
 OBJDIR_TAG = _OPT
 else
 ifdef USE_MSVC
 OPTIMIZER  = -Zi
+INTERP_OPTIMIZER = -Zi
 else
 OPTIMIZER  = -g3
+INTERP_OPTIMIZER = -g3
 endif
 DEFINES    += -DDEBUG -DDEBUG_$(USER)
 OBJDIR_TAG = _DBG
 endif
 
 SO_SUFFIX = so
 
 NS_USE_NATIVE = 1
--- a/js/src/rules.mk
+++ b/js/src/rules.mk
@@ -72,30 +72,37 @@ endif
 	@$(MAKE_OBJDIR)
 	$(CC) -o $@ $(CFLAGS) $*.c $(LDFLAGS)
 
 # This rule must come before the rule with no dep on header
 $(OBJDIR)/%.o: %.c %.h
 	@$(MAKE_OBJDIR)
 	$(CC) -o $@ -c $(CFLAGS) $*.c
 
+$(OBJDIR)/jsinterp.o: jsinterp.c jsinterp.h
+	@$(MAKE_OBJDIR)
+	$(CC) -o $@ -c $(INTERP_CFLAGS) jsinterp.c
 
 $(OBJDIR)/%.o: %.c
 	@$(MAKE_OBJDIR)
 	$(CC) -o $@ -c $(CFLAGS) $*.c
 
 $(OBJDIR)/%.o: %.s
 	@$(MAKE_OBJDIR)
 	$(AS) -o $@ $(ASFLAGS) $*.s
 
 # This rule must come before rule with no dep on header
 $(OBJDIR)/%.obj: %.c %.h
 	@$(MAKE_OBJDIR)
 	$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
 
+$(OBJDIR)/jsinterp.obj: jsinterp.c jsinterp.h
+	@$(MAKE_OBJDIR)
+	$(CC) -Fo$(OBJDIR)/ -c $(INTERP_CFLAGS) $(JSDLL_CFLAGS) jsinterp.c
+
 $(OBJDIR)/%.obj: %.c
 	@$(MAKE_OBJDIR)
 	$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $(JSDLL_CFLAGS) $*.c
 
 $(OBJDIR)/js.obj: js.c
 	@$(MAKE_OBJDIR)
 	$(CC) -Fo$(OBJDIR)/ -c $(CFLAGS) $<