Subject: Re: [Boost-build] Compiling with -O0 with <release>debug and <toolset>clang-darwin
From: Christian Schafmeister (chris.schaf_at_[hidden])
Date: 2013-10-13 18:09:22
Christian Schafmeister <chris.schaf_at_[hidden]> writes:
> chris.schaf_at_[hidden] writes:
>> How can I get boost-build to compile with -O0 using
>> <toolset>clang-darwin and <release>debug.
>> Currently as shown below there is still a "-O1" option in the compile
>> command and I'm afraid that it is the reason why I can't print local
>> variables when I debug the executable with "lldb".
>> bjam -j1 toolset=clang-darwin bundle debug -n
>> "clang++" -x c++ -O0 -g -O1 -Warray-bounds -Wframe-larger-than=16
>> -Wlarger-than=4 -Wno-deprecated-register -std=c++11 -stdlib=libc++
>> -O0 -fno-inline -Wall -g -DDEBUG_ASSERTS -DDEBUG_MPS -DEXPAT
>> -DINCLUDED_FROM_BRCL -DINHERITED_FROM_SRC -DREADLINE
>> -D_ADDRESS_MODEL_64 -D_DEBUG_BUILD -D_TARGET_OS_DARWIN
>> -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS
>> -I"../../src" -I"../../src/core"
>> -c -o "../../src/core/bin/clang-darwin-darwin/debug/stringList.o"
>> Unsubscribe & other changes:
> One other thing - the compile command below is what I got after a lot of
> messing around with .jam files and the preceeding "-O0" appears to be overriding the
> following "-O1". When I compile now I am able to print local variables
> in lldb (hurray!).
> But if anyone could tell me how to remove the "-O1" completely I'd very much
> appreciate it.
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
I just learned that the last -O# option overrides all others and so I
don't need to remove the -O1 from the compile commands because it is
overridden by the following -O0.
Well, that was an auspicious first post to boost.build mailing list.
If you read this far - thanks.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk