提交 2275336a 编写于 作者: S sgehwolf

8210647: libsaproc is being compiled without optimization

Reviewed-by: erikj, jcbeyler
上级 2e93ae9c
...@@ -59,6 +59,11 @@ ifeq ($(DEBUG_BINARIES), true) ...@@ -59,6 +59,11 @@ ifeq ($(DEBUG_BINARIES), true)
SA_DEBUG_CFLAGS = -g SA_DEBUG_CFLAGS = -g
endif endif
# Optimize saproc lib at level -O3 unless it's a slowdebug build
ifneq ($(BUILD_FLAVOR), debug)
SA_OPT_FLAGS = $(OPT_CFLAGS)
endif
# if $(AGENT_DIR) does not exist, we don't build SA # if $(AGENT_DIR) does not exist, we don't build SA
# also, we don't build SA on Itanium or zero. # also, we don't build SA on Itanium or zero.
...@@ -95,6 +100,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) ...@@ -95,6 +100,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(SASRCFILES) \ $(SASRCFILES) \
$(SA_LFLAGS) \ $(SA_LFLAGS) \
$(SA_DEBUG_CFLAGS) \ $(SA_DEBUG_CFLAGS) \
$(SA_OPT_FLAGS) \
$(EXTRA_CFLAGS) \ $(EXTRA_CFLAGS) \
-o $@ \ -o $@ \
-lthread_db -ldl -lthread_db -ldl
......
...@@ -99,20 +99,25 @@ SAWINDBG=sawindbg.dll ...@@ -99,20 +99,25 @@ SAWINDBG=sawindbg.dll
checkAndBuildSA:: $(SAWINDBG) checkAndBuildSA:: $(SAWINDBG)
# These do not need to be optimized (don't run a lot of code) and it !if "$(BUILD_FLAVOR)" == "debug"
# will be useful to have the assertion checks in place SA_EXTRA_CFLAGS = -Od -D "_DEBUG"
!elseif "$(BUILD_FLAVOR)" == "fastdebug"
SA_EXTRA_CFLAGS = -O2 -D "_DEBUG"
!else
SA_EXTRA_CFLAGS = -O2
!endif
!if "$(BUILDARCH)" == "ia64" !if "$(BUILDARCH)" == "ia64"
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
!elseif "$(BUILDARCH)" == "amd64" !elseif "$(BUILDARCH)" == "amd64"
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -Od -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -c SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 $(GX_OPTION) -D "WIN32" -D "WIN64" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -c
!if "$(COMPILER_NAME)" == "VS2005" !if "$(COMPILER_NAME)" == "VS2005"
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line, # On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line,
# otherwise we get missing __security_check_cookie externals at link time. # otherwise we get missing __security_check_cookie externals at link time.
SA_LD_FLAGS = bufferoverflowU.lib SA_LD_FLAGS = bufferoverflowU.lib
!endif !endif
!else !else
SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 -Gm $(GX_OPTION) -Od -D "WIN32" -D "_WINDOWS" -D "_DEBUG" -D "_CONSOLE" -D "_MBCS" -YX -FD -GZ -c SA_CFLAGS = -nologo $(MS_RUNTIME_OPTION) -W3 -Gm $(GX_OPTION) -D "WIN32" -D "_WINDOWS" -D "_CONSOLE" -D "_MBCS" -YX -FD -GZ -c
!if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1" !if "$(ENABLE_FULL_DEBUG_SYMBOLS)" == "1"
SA_CFLAGS = $(SA_CFLAGS) -ZI SA_CFLAGS = $(SA_CFLAGS) -ZI
!endif !endif
...@@ -120,6 +125,7 @@ SA_CFLAGS = $(SA_CFLAGS) -ZI ...@@ -120,6 +125,7 @@ SA_CFLAGS = $(SA_CFLAGS) -ZI
!if "$(MT)" != "" !if "$(MT)" != ""
SA_LD_FLAGS = -manifest $(SA_LD_FLAGS) SA_LD_FLAGS = -manifest $(SA_LD_FLAGS)
!endif !endif
SA_CFLAGS = $(SA_CFLAGS) $(SA_EXTRA_CFLAGS)
SASRCFILES = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp \ SASRCFILES = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp \
$(AGENT_DIR)/src/share/native/sadis.c $(AGENT_DIR)/src/share/native/sadis.c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册