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

8210647: libsaproc is being compiled without optimization

Reviewed-by: erikj, jcbeyler
上级 2e93ae9c
......@@ -59,6 +59,11 @@ ifeq ($(DEBUG_BINARIES), true)
SA_DEBUG_CFLAGS = -g
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
# also, we don't build SA on Itanium or zero.
......@@ -95,6 +100,7 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(SASRCFILES) \
$(SA_LFLAGS) \
$(SA_DEBUG_CFLAGS) \
$(SA_OPT_FLAGS) \
$(EXTRA_CFLAGS) \
-o $@ \
-lthread_db -ldl
......
......@@ -99,20 +99,25 @@ SAWINDBG=sawindbg.dll
checkAndBuildSA:: $(SAWINDBG)
# These do not need to be optimized (don't run a lot of code) and it
# will be useful to have the assertion checks in place
!if "$(BUILD_FLAVOR)" == "debug"
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"
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"
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"
# On amd64, VS2005 compiler requires bufferoverflowU.lib on the link command line,
# otherwise we get missing __security_check_cookie externals at link time.
SA_LD_FLAGS = bufferoverflowU.lib
!endif
!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"
SA_CFLAGS = $(SA_CFLAGS) -ZI
!endif
......@@ -120,6 +125,7 @@ SA_CFLAGS = $(SA_CFLAGS) -ZI
!if "$(MT)" != ""
SA_LD_FLAGS = -manifest $(SA_LD_FLAGS)
!endif
SA_CFLAGS = $(SA_CFLAGS) $(SA_EXTRA_CFLAGS)
SASRCFILES = $(AGENT_DIR)/src/os/win32/windbg/sawindbg.cpp \
$(AGENT_DIR)/src/share/native/sadis.c
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册