diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-21 04:34:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-06-21 04:34:25 +0000 |
commit | 6af650256b38581ae396b8fb004d254856c48d89 (patch) | |
tree | d2e11fe1097fa2af4f3494c6612e4ec73a3c9647 | |
parent | 5682bfe2d9912055811697c569638423ae0e318a (diff) |
RUBY_DEVEL flag
* configure.in: define RUBY_DEVEL only in the trunk.
* gc.c: enable runtime rgengc debug if RUBY_DEVEL
* ruby.c (debug_option): enable RUBY_DEBUG in --debug option only
if RUBY_DEVEL.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | configure.in | 4 | ||||
-rw-r--r-- | gc.c | 4 | ||||
-rw-r--r-- | ruby.c | 2 | ||||
-rw-r--r-- | win32/Makefile.sub | 3 | ||||
-rw-r--r-- | win32/setup.mak | 3 |
5 files changed, 15 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 8566f394c6..e30ae6c9c9 100644 --- a/configure.in +++ b/configure.in @@ -840,7 +840,8 @@ AS_IF([test x"${RPATHFLAG}" = x], [ ]) AS_CASE([$RUBY_PATCHLEVEL], [-*], - [particular_werror_flags=yes], [particular_werror_flags=no]) + [RUBY_DEVEL=yes], [RUBY_DEVEL=no]) +particular_werror_flags=$RUBY_DEVEL AC_ARG_ENABLE(werror, AS_HELP_STRING([--disable-werror], [don't make warnings into errors @@ -1019,6 +1020,7 @@ AS_IF([test "$GCC" = yes], [ test "${debugflags+set}" || {RUBY_TRY_CFLAGS(-g3, [debugflags=-g3])} ]) test $ac_cv_prog_cc_g = yes && : ${debugflags=-g} +AS_IF([test "x$RUBY_DEVEL" = xyes], [debugflags="$debugflags -DRUBY_DEVEL=1"]) AS_IF([test "$GCC" = ""], [ AS_CASE(["$target_os"],[aix*],[warnflags="$warnflags -qinfo=por" rb_cv_warnflags="$rb_cv_warnflags -qinfo=por"]) @@ -221,8 +221,12 @@ static ruby_gc_params_t gc_params = { * 5: sweep */ #ifndef RGENGC_DEBUG +#ifdef RUBY_DEVEL +#define RGENGC_DEBUG -1 +#else #define RGENGC_DEBUG 0 #endif +#endif #if RGENGC_DEBUG < 0 #undef RGENGC_DEBUG #define RGENGC_DEBUG ruby_rgengc_debug @@ -865,7 +865,9 @@ debug_option(const char *str, int len, void *arg) static const char list[] = EACH_DEBUG_FEATURES(LITERAL_NAME_ELEMENT, ", "); #define SET_WHEN_DEBUG(bit) SET_WHEN(#bit, DEBUG_BIT(bit), str, len) EACH_DEBUG_FEATURES(SET_WHEN_DEBUG, ;); +#ifdef RUBY_DEVEL if (ruby_patchlevel < 0 && ruby_env_debug_option(str, len, 0)) return; +#endif rb_warn("unknown argument for --debug: `%.*s'", len, str); rb_warn("debug features are [%.*s].", (int)strlen(list), list); } diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 386fcbfd69..ed89832f0e 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -113,6 +113,9 @@ ARCH = $(MACHINE) !if !defined(DEBUGFLAGS) DEBUGFLAGS = -Zi !endif +!if "$(RUBY_DEVEL)" == "yes" +DEBUGFLAGS = $(DEBUGFLAGS) -DRUBY_DEVEL=1 +!endif !if !defined(OPTFLAGS) !if $(MSC_VER) < 1400 OPTFLAGS = -O2b2xg- diff --git a/win32/setup.mak b/win32/setup.mak index 91f8123868..151274781b 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -155,6 +155,9 @@ echo RUBY_PROGRAM_VERSION = %ruby_version:""=% echo MAJOR = %major% echo MINOR = %minor% echo TEENY = %teeny% +#if defined RUBY_PATCHLEVEL && RUBY_PATCHLEVEL < 0 +echo RUBY_DEVEL = yes +#endif del %0 & exit << |