Boost logo

Boost-Build :

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
>> -I"../../build/"
>> -I"../../src" -I"../../src/core"
>> -I"../../src/core/bin/clang-darwin-darwin/debug"
>> -I"/Library/Frameworks/EPD64.framework/Versions/7.2/include/python2.7"
>> -I"/Users/meister/Development/cando/brcl/build/"
>> -I"/Users/meister/Development/cando/brcl/build/"
>> -c -o "../../src/core/bin/clang-darwin-darwin/debug/stringList.o"
>> "../../src/core/"
>> _______________________________________________
>> 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:


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 mailing list.

If you read this far - thanks.

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at