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
This commit is contained in:
parent
5682bfe2d9
commit
6af650256b
@ -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"])
|
||||
|
4
gc.c
4
gc.c
@ -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
|
||||
|
2
ruby.c
2
ruby.c
@ -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);
|
||||
}
|
||||
|
@ -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-
|
||||
|
@ -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
|
||||
<<
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user