Bug 296653 - mkdepend takes more than 10 hours on Solaris for nsIconChannel.cpp. Patch by Ginn Chen <ginn.chen@sun.com>, r=cls, a=bz

This commit is contained in:
jwalden@mit.edu 2007-08-17 16:07:39 -07:00
Родитель 4e7d7cfc20
Коммит 444f76bd14
4 изменённых файлов: 42 добавлений и 13 удалений

Просмотреть файл

@ -1110,7 +1110,24 @@ ifdef MOZ_POST_DSO_LIB_COMMAND
endif
ifdef MOZ_AUTO_DEPS
ifndef COMPILER_DEPEND
ifdef COMPILER_DEPEND
ifeq (__SunOS,$(GNU_CC)_$(GNU_CXX)_$(OS_ARCH))
_MDDEPFILE = $(MDDEPDIR)/$(@F).pp
define MAKE_DEPS_AUTO_CC
if test -d $(@D); then \
echo "Building deps for $< using Sun Studio cc"; \
$(CC) $(COMPILE_CFLAGS) -xM $< >$(_MDDEPFILE) ; \
fi
endef
define MAKE_DEPS_AUTO_CXX
if test -d $(@D); then \
echo "Building deps for $< using Sun Studio CC"; \
$(CXX) $(COMPILE_CXXFLAGS) -xM $< >$(_MDDEPFILE) ; \
fi
endef
endif # Sun Studio on Solaris
else # COMPILER_DEPEND
#
# Generate dependencies on the fly
#
@ -1137,7 +1154,11 @@ if test -d $(@D); then \
fi
endef
endif # WINNT
endif # !COMPILER_DEPEND
MAKE_DEPS_AUTO_CC = $(MAKE_DEPS_AUTO)
MAKE_DEPS_AUTO_CXX = $(MAKE_DEPS_AUTO)
endif # COMPILER_DEPEND
endif # MOZ_AUTO_DEPS
@ -1164,12 +1185,12 @@ host_%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in
%: %.c Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) $(CFLAGS) $(LDFLAGS) $(OUTOPTION)$@ $(_VPATH_SRCS)
%.$(OBJ_SUFFIX): %.c Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
moc_%.cpp: %.h Makefile Makefile.in
@ -1188,7 +1209,7 @@ endif
$(AS) -o $@ $(ASFLAGS) -c $<
%: %.cpp Makefile Makefile.in
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CXX)
$(CCC) $(OUTOPTION)$@ $(CXXFLAGS) $(_VPATH_SRCS) $(LDFLAGS)
#
@ -1196,12 +1217,12 @@ endif
#
%.$(OBJ_SUFFIX): %.cc Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
%.$(OBJ_SUFFIX): %.cpp Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CXX)
ifdef STRICT_CPLUSPLUS_SUFFIX
echo "#line 1 \"$*.cpp\"" | cat - $*.cpp > t_$*.cc
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) t_$*.cc
@ -1212,12 +1233,12 @@ endif #STRICT_CPLUSPLUS_SUFFIX
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.mm Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(_VPATH_SRCS)
$(OBJ_PREFIX)%.$(OBJ_SUFFIX): %.m Makefile Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(ELOG) $(CC) -o $@ -c $(COMPILE_CFLAGS) $(_VPATH_SRCS)
%.s: %.cpp

Просмотреть файл

@ -6669,6 +6669,10 @@ MOZ_ARG_DISABLE_BOOL(md,
[dnl Default is to turn on -MD if using GNU-compatible compilers
if test "$GNU_CC" -a "$GNU_CXX" -a "$OS_ARCH" != "WINNT" -a "$OS_ARCH" != "WINCE"; then
_cpp_md_flag=1
fi
dnl Default is to use -xM if using Sun Studio on Solaris
if test -z "$GNU_CC" && test -z "$GNU_CXX" && test "$OS_ARCH" = "SunOS"; then
_cpp_md_flag=1
fi])
if test "$_cpp_md_flag"; then
COMPILER_DEPEND=1
@ -6677,6 +6681,10 @@ if test "$_cpp_md_flag"; then
else
_DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)'
fi
dnl Sun Studio on Solaris use -xM instead of -MD, see config/rules.mk
if test -z "$GNU_CC" && test -z "$GNU_CXX" && test "$OS_ARCH" = "SunOS"; then
_DEPEND_CFLAGS=
fi
else
COMPILER_DEPEND=
_USE_CPP_INCLUDE_FLAG=

Просмотреть файл

@ -299,7 +299,7 @@ ifndef GNU_CC
_COMPILE_CFLAGS = $(patsubst -O%,-O1,$(COMPILE_CFLAGS))
jsapi.o jsxdrapi.o jsarena.o jsarray.o jsatom.o jsemit.o jsfun.o jsinterp.o jsregexp.o jsparse.o jsopcode.o jsscript.o: %.o: %.c Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(_COMPILE_CFLAGS) $<
endif
endif
@ -309,11 +309,11 @@ endif
ifeq ($(OS_ARCH),AIX)
jsatom.o: jsatom.c Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
jsdtoa.o: jsdtoa.c Makefile.in
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CC)
$(CC) -o $@ -c $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(COMPILE_CFLAGS)) $<
endif

Просмотреть файл

@ -106,6 +106,6 @@ GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/, \
ifeq ($(OS_ARCH), OS2)
nsPrefService.$(OBJ_SUFFIX): nsPrefService.cpp
$(REPORT_BUILD)
@$(MAKE_DEPS_AUTO)
@$(MAKE_DEPS_AUTO_CXX)
$(ELOG) $(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS:-O2=-O1) $(_VPATH_SRCS)
endif