This is an archive of the discontinued LLVM Phabricator instance.

LLDB cmake fix: define LLDB_CONFIGURATION_xxx based on the build type
ClosedPublic

Authored by lemo on Oct 4 2017, 10:50 AM.

Details

Summary

Neither LLDB_CONFIGURATION_DEBUG nor LLDB_CONFIGURATION_RELEASE were ever set in the CMake LLDB project.

Also cleaned up a questionable #ifdef in SharingPtr.h, removing all the references to LLDB_CONFIGURATION_BUILD_AND_INTEGRATION in the process.

Differential Revision: https://reviews.llvm.org/D38552

Diff Detail

Repository
rL LLVM

Event Timeline

lemo created this revision.Oct 4 2017, 10:50 AM
lemo edited the summary of this revision. (Show Details)Oct 4 2017, 10:53 AM
zturner added inline comments.Oct 4 2017, 11:04 AM
CMakeLists.txt
15 ↗(On Diff #117697)

I'm pretty sure that if you run CMake without specifying anything for CMAKE_BUILD_TYPE then the default is debug, but it doesn't internally set CMAKE_BUILD_TYPE=Debug. Can you double check this handles the default case appropriately?

lemo added a comment.Oct 4 2017, 11:08 AM

Good point, I wouldn't be surprised if that was the case at some point, but right now the main llvm CMakeLists.txt has this:

...
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)

message(STATUS "No build type selected, default to Debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE)

endif()
...

I will double check though, thanks for pointing this out.

lemo updated this revision to Diff 117704.Oct 4 2017, 11:15 AM

Changed how CMAKE_BUILD_TYPE is tested to ensure we default to LLDB_CONFIGURATION_DEBUG.

lemo marked an inline comment as done.Oct 4 2017, 11:16 AM
zturner added inline comments.Oct 4 2017, 11:22 AM
CMakeLists.txt
15 ↗(On Diff #117704)

Isn't this identical to the code before?

zturner accepted this revision.Oct 4 2017, 11:43 AM
This revision is now accepted and ready to land.Oct 4 2017, 11:43 AM
This revision was automatically updated to reflect the committed changes.