diff options
author | Jason Rumney <jasonr@gnu.org> | 2008-07-23 15:41:23 +0000 |
---|---|---|
committer | Jason Rumney <jasonr@gnu.org> | 2008-07-23 15:41:23 +0000 |
commit | 75663c75e0b1f07539c0b296405f707edb30c7a2 (patch) | |
tree | 8de710a5515e7063f1d70edcc68e9b9660e3bade | |
parent | 4b1355037a72c74a0711193d8ef9555bdb728772 (diff) | |
download | emacs-75663c75e0b1f07539c0b296405f707edb30c7a2.tar.gz |
* configure.bat: New option --profile.
* gmake.defs: Set cflags and ldflags for profiling when specified.
-rw-r--r-- | nt/ChangeLog | 5 | ||||
-rwxr-xr-x | nt/configure.bat | 10 | ||||
-rw-r--r-- | nt/gmake.defs | 13 |
3 files changed, 26 insertions, 2 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 070e46939b8..583bb5d515a 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,8 @@ +2008-07-23 Jason Rumney <jasonr@gnu.org> + + * configure.bat: New option --profile. + * gmake.defs: Set cflags and ldflags for profiling when specified. + 2008-07-23 Dan Nicolaescu <dann@ics.uci.edu> * config.nt (C_SWITCH_SITE, LD_SWITCH_SITE): Do not undefine. diff --git a/nt/configure.bat b/nt/configure.bat index 3dd9a7fcc24..f99f0b284f4 100755 --- a/nt/configure.bat +++ b/nt/configure.bat @@ -80,6 +80,7 @@ rem Default settings. set prefix=
set nodebug=N
set noopt=N
+set profile=N
set nocygwin=N
set COMPILER=
set usercflags=
@@ -99,6 +100,7 @@ if "%1" == "--with-gcc" goto withgcc if "%1" == "--with-msvc" goto withmsvc
if "%1" == "--no-debug" goto nodebug
if "%1" == "--no-opt" goto noopt
+if "%1" == "--profile" goto profile
if "%1" == "--no-cygwin" goto nocygwin
if "%1" == "--cflags" goto usercflags
if "%1" == "--ldflags" goto userldflags
@@ -116,6 +118,7 @@ echo. --with-gcc use GCC to compile Emacs echo. --with-msvc use MSVC to compile Emacs
echo. --no-debug exclude debug info from executables
echo. --no-opt disable optimization
+echo. --profile enable profiling
echo. --no-cygwin use -mno-cygwin option with GCC
echo. --cflags FLAG pass FLAG to compiler
echo. --ldflags FLAG pass FLAG to compiler when linking
@@ -152,6 +155,11 @@ set noopt=Y shift
goto again
rem ----------------------------------------------------------------------
+:profile
+set profile=Y
+shift
+goto again
+rem ----------------------------------------------------------------------
:nocygwin
set nocygwin=Y
shift
@@ -492,6 +500,7 @@ if not "(%mf%)" == "()" echo MCPU_FLAG=%mf%>>config.settings if not "(%dbginfo%)" == "()" echo DEBUG_INFO=%dbginfo%>>config.settings
if (%nodebug%) == (Y) echo NODEBUG=1 >>config.settings
if (%noopt%) == (Y) echo NOOPT=1 >>config.settings
+if (%profile%) == (Y) echo PROFILE=1 >>config.settings
if (%nocygwin%) == (Y) echo NOCYGWIN=1 >>config.settings
if not "(%prefix%)" == "()" echo INSTALL_DIR=%prefix%>>config.settings
rem We go thru docflags because usercflags could be "-DFOO=bar" -something
@@ -619,6 +628,7 @@ set $foo$= set prefix=
set nodebug=
set noopt=
+set profile=
set nocygwin=
set COMPILER=
set MAKECMD=
diff --git a/nt/gmake.defs b/nt/gmake.defs index 24c08595547..4959aa947ee 100644 --- a/nt/gmake.defs +++ b/nt/gmake.defs @@ -197,9 +197,18 @@ DEBUG_CFLAGS = -DEMACSDEBUG else DEBUG_CFLAGS = endif -CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) +CFLAGS = -I. $(ARCH_CFLAGS) $(DEBUG_CFLAGS) $(PROFILE_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS) EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1 +ifdef PROFILE +PROFILE_CFLAGS = -pg +PROFILE_LDFLAGS = -pg +else +PROFILE_CFLAGS = +PROFILE_LDFLAGS = +endif + + # see comments in allocate_heap in w32heap.c before changing any of the # -stack, -heap, or -image-base settings. TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map @@ -276,7 +285,7 @@ else ERROR Unknown architecture type "$(ARCH)". endif -LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(NOCYGWIN) $(USER_LDFLAGS) +LINK_FLAGS = $(ARCH_LDFLAGS) $(DEBUG_LINK) $(PROFILE_LDFLAGS) $(NOCYGWIN) $(USER_LDFLAGS) export XMFLAGS |