[llvm] r186499 - Tweak the cmake interaction between CMAKE_BUILD_TYPE and LLVM_ENABLE_ASSERTIONS.
tscheller at apple.com
Fri Sep 20 11:16:14 PDT 2013
On Sep 20, 2013, at 8:07 PM, Pete Cooper <peter_cooper at apple.com> wrote:
> On Sep 20, 2013, at 10:56 AM, Tilmann Scheller <tscheller at apple.com> wrote:
>> I ran into a similar issue yesterday, I was wondering why an assert wouldn’t trigger. Looking at the disassembly I realized that the code for the assert was actually not there even though I was building with CMAKE_BUILD_TYPE=Debug. How could that happen?
>> Turns out when I did the initial configure of my build directory I forgot to set CMAKE_BUILD_TYPE, so once I realized I couldn’t debug my binary I did a CMAKE_BUILD_TYPE=Debug. After that debugging works fine again, however asserts are still turned off!
> Strange. The LLVM cmake documentation implies that debug should have enabled asserts, that is it says that:
> Enables code assertions. Defaults to OFF if and only if CMAKE_BUILD_TYPE is Release.
If I do the initial configure of my build directory specifying CMAKE_BUILD_TYPE=Debug then asserts get turned on just fine. Only seems to break when I switch to a Debug build type from a build type which has assertions disabled.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits