[MacRuby] #1468: Improve management of debug #defines
MacRuby
ruby-noreply at macosforge.org
Tue Feb 21 13:00:20 PST 2012
#1468: Improve management of debug #defines
--------------------------------+-------------------------------------------
Reporter: msabramo@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
--------------------------------+-------------------------------------------
I want to be able to build MacRuby with debug information by tweaking the
command-line instead of the code itself (which is what I had been doing
until now). Something like:
{{{
[last: 41] marca at SCML-MarcA:~/dev/git-repos/MacRuby$
CFLAGS="-DROXOR_VM_DEBUG" rake
(in /Users/marca/dev/git-repos/MacRuby)
/usr/bin/g++ -I. -I./include -fblocks -g -Wall -Wno-deprecated-
declarations -Werror -arch x86_64 -DROXOR_VM_DEBUG -I/usr/local/include
-D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3
-fno-rtti -fno-common -Woverloaded-virtual -I./icu-1060 -c vm.cpp -o
.objs/vm.o
vm.cpp:9:1: error: "ROXOR_VM_DEBUG" redefined
<command-line>: error: this is the location of the previous definition
rake aborted!
Command failed with status (1): [/usr/bin/g++ -I. -I./include -fblocks -g
-...]
(See full trace by running task with --trace)
}}}
This fails because vm.cpp has:
{{{
#define ROXOR_VM_DEBUG 0
}}}
I could fix this by changing that to:
{{{
#ifndef ROXOR_VM_DEBUG
#define ROXOR_VM_DEBUG 0
#endif
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/1468>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list