Page MenuHomePhabricator

Xcode build: specify NDEBUG for all binaries built using the BuildAndIntegration configuration

Authored by tfiala on Nov 10 2016, 8:56 AM.



BuildAndIntegration is the configuration used to build Apple-built LLDB. This configuration currently requires NDEBUG to be specified. This change adds a new Xcode variable, LLDB_NDEBUG_CFLAGS, which specifies "-DNDEBUG" when using the BuildAndIntegration configuration, and specifies nothing for all other configurations. All binaries have been modified to include $(LLDB_NDEBUG_CFLAGS) in the full set of other cflags and other cxxflags.

Diff Detail

Event Timeline

tfiala updated this revision to Diff 77499.Nov 10 2016, 8:56 AM
tfiala retitled this revision from to Xcode build: specify NDEBUG for all binaries built using the BuildAndIntegration configuration.
tfiala updated this object.
tfiala added a reviewer: clayborg.
tfiala added a subscriber: lldb-commits.

Adding Jim, as I just want one of him or Greg to review.

clayborg edited edge metadata.Nov 10 2016, 10:29 AM

If we do this the asserts we have will no longer fire. We tend not to use asserts too much, but it would be a good idea to take a look at any asserts in our code to make sure we won't die horribly in other ways that will cause us not to know what crashed us.

clayborg requested changes to this revision.Nov 22 2016, 9:18 AM
clayborg edited edge metadata.

We will need to take a look at the existing assert calls within LLDB and within LLVM to make sure we won't cause things to crash at a later time with no context as to what happened. Any code that asserts should actually be able to continue without problems, but I know that isn't the case for us and certainly isn't for llvm and clang.

This revision now requires changes to proceed.Nov 22 2016, 9:18 AM
tfiala abandoned this revision.Dec 15 2016, 4:15 PM

This one needs more analysis.

I'm bowing out of it. Greg, you might want to pick this one up?