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 15:17:08


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
> -D__STDC_LIMIT_MACROS
> -I"../../build/cando.app/Contents/Resources/externals/gmp-5.0.5"
> -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/cando.app/Contents/Resources/externals/common/include"
> -I"/Users/meister/Development/cando/brcl/build/cando.app/Contents/Resources/externals/release/include"
> -c -o "../../src/core/bin/clang-darwin-darwin/debug/stringList.o"
> "../../src/core/stringList.cc"
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost-build

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.


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